Remove-WssFolder

Removes a server folder.

Syntax

Remove-WssFolder
      -Name <String>
      [-Force]
      [-DeleteContents]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-WssFolder
      -Folder <Folder>
      [-Force]
      [-DeleteContents]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-WssFolder
      -ID <Guid>
      [-Force]
      [-DeleteContents]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-WssFolder cmdlet removes a server folder. If you specify the DeleteContents parameter, the cmdlet deletes the contents of the server folder that you specify. If you do not specify the DeleteContents parameter, the cmdlet stops sharing the contents of the server folder.

Examples

Example 1: Remove a server folder

PS C:\> Remove-WssFolder -Name "ProjectsNorth" -DeleteContents

This command removes the server folder named ProjectsNorth and deletes all the contents of the folder.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeleteContents

Indicates that the cmdlet deletes the contents of the server folder.

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

-Folder

Specifies the name of a folder.

Type:Folder
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

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

-ID

Specifies the GUID for a folder.

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of a folder.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.WindowsServerSolutions.Storage.Folder

Outputs

Microsoft.WindowsServerSolutions.Storage.Folder

This cmdlet generates an object that represents the removed folder.