Skip to content

Latest commit

 

History

History
187 lines (143 loc) · 3.7 KB

File metadata and controls

187 lines (143 loc) · 3.7 KB
external help file Module Name online version schema
WSS_Cmdlets.xml
WssCmdlets
2.0.0

Set-WssDrive

SYNOPSIS

Changes drive name or whether to enable snapshots.

SYNTAX

UNNAMED_PARAMETER_SET_1

Set-WssDrive [-Name] <String> [[-NewName] <String>] [[-SnapshotsEnabled] <Boolean>] [-Force] [-Confirm]
 [-WhatIf]

UNNAMED_PARAMETER_SET_2

Set-WssDrive [-Drive] <Drive> [[-NewName] <String>] [[-SnapshotsEnabled] <Boolean>] [-Force] [-Confirm]
 [-WhatIf]

UNNAMED_PARAMETER_SET_3

Set-WssDrive [-ID] <Guid> [[-NewName] <String>] [[-SnapshotsEnabled] <Boolean>] [-Force] [-Confirm] [-WhatIf]

DESCRIPTION

The Set-WssDrive cmdlet changes the name of a drive or whether to enable snapshots for a drive. You can specify a drive by using its name or its GUID, or you can use the Get-WssDrive cmdlet to obtain a Drive object. To specify a new drive name, use the NewName parameter. To specify whether to enable snapshots, use the SnapShotsEnabled parameter.

EXAMPLES

Example 1: Change the name of a drive

PS C:\>$Drive = Get-WssDrive -ID b6b093a2-1860-4172-a4a5-07ce2aebfa13 PS C:\> Set-WssDrive -Drive $Drive -NewName "Sarah Jones Volume"

This example renames a drive. The first command uses the Get-WssDrive cmdlet to get a Drive object that has the specified GUID, and stores it in the $Drive variable.

The second command changes the name of the drive represented by the object stored in the $Drive variable to Sarah Jones Volume.

PARAMETERS

-Drive

Specifies a Drive object. To obtain a Drive object, use the Get-WssDrive cmdlet.

Type: Drive
Parameter Sets: UNNAMED_PARAMETER_SET_2
Aliases: 

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Force

Forces the command to run without asking for user confirmation.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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

-ID

Specifies the GUID of a drive.

Type: Guid
Parameter Sets: UNNAMED_PARAMETER_SET_3
Aliases: 

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

-Name

Specifies the name of a drive.

Type: String
Parameter Sets: UNNAMED_PARAMETER_SET_1
Aliases: 

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

-NewName

Specifies a new name for the drive.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SnapshotsEnabled

Indicates whether to enable snapshots on the drive.

Type: Boolean
Parameter Sets: (All)
Aliases: 

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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

INPUTS

OUTPUTS

Drive

NOTES

RELATED LINKS

Get-WssDrive

Test-WssDrive