Remove-WssFolder

Remove-WssFolder

Removes a server folder.

Syntax

Parameter Set: ByNameParamSet
Remove-WssFolder -Name <String> [-DeleteContents] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByIdParamSet
Remove-WssFolder -ID <Guid> [-DeleteContents] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByObjectParamSet
Remove-WssFolder -Folder <Folder> [-DeleteContents] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed 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.

Parameters

-DeleteContents

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Folder<Folder>

Specifies the name of a folder.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ID<Guid>

Specifies the GUID for a folder.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a folder.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.WindowsServerSolutions.Storage.Folder

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.WindowsServerSolutions.Storage.Folder

Examples

Example 1: Remove a server folder

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

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

Add-WssFolder

Get-WssFolder

Set-WssFolder

Move-WssFolder

Measure-WssFolder