Move-WssFolder

Moves a server folder to a different drive.

Syntax

Move-WssFolder
    [-Force]
    [-Folder] <Folder>
    [-NewDrive] <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Move-WssFolder
    [-Force]
    [-Folder] <Folder>
    [-Cancel]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Move-WssFolder cmdlet moves a server folder to a different drive.

Examples

Example 1: Move a folder to a different drive

PS C:\> $Folder = Get-WssFolder -Name "ProjectsWest"
PS C:\> Move-WssFolder -Folder $Folder -NewDrive "E:\"

The first command gets the folder named ProjectsWest and stores it in the $Folder variable.

The second command moves the folder stored it in the $Folder variable from the current drive to the root directory on the drive E.

Parameters

-Cancel

Indicates that the cmdlet attempts to cancel a move that is in progress.

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

-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

-Folder

Specifies the name of a folder.

Type:Folder
Position:0
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

-NewDrive

Specifies the destination path for the folder on the new drive.

Type:String
Position:1
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

Outputs

Folder