Add-WssFolder

Creates a new server folder.

Syntax

Add-WssFolder
   [-Name] <String>
   [-Path] <String>
   [[-Description] <String>]
   [-HideFolderFromRemoteAccess]
   [[-ComputerName] <String>]
   [-KeepPermission]
   [<CommonParameters>]
Add-WssFolder
   [-Id] <Guid>
   [-Path] <String>
   [[-Description] <String>]
   [-HideFolderFromRemoteAccess]
   [[-ComputerName] <String>]
   [-KeepPermission]
   [<CommonParameters>]

Description

The Add-WssFolder cmdlet creates a server folder.

Examples

Example 1: Create a server folder

PS C:\> Add-WssFolder -Name "ProjectsEast" -Path "D:\Contoso\Main"

This command creates the folder named ProjectsEast in D:\Contoso\Main.

Required Parameters

-Id

Specifies the GUID for a built-in server folder. Specify this parameter to re-create a default shared folder, such as the Music folder or the Pictures folder.

Type:Guid
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies a name for the folder.

Type:String
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Path

Specifies the path of the folder.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ComputerName

Specifies the name of a computer.

Type:String
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the server folder.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-HideFolderFromRemoteAccess

Specifies whether to hide the folder in Remote Desktop Web Access or Web service applications.

Type:SwitchParameter
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-KeepPermission

Indicates that the folder keeps the permissions of the parent folder.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.WindowsServerSolutions.Storage.Folder

This cmdlet returns the new server folder.