external help file | Module Name | online version | schema |
---|---|---|---|
WSS_Cmdlets.xml |
WssCmdlets |
2.0.0 |
Changes drive name or whether to enable snapshots.
Set-WssDrive [-Name] <String> [[-NewName] <String>] [[-SnapshotsEnabled] <Boolean>] [-Force] [-Confirm]
[-WhatIf]
Set-WssDrive [-Drive] <Drive> [[-NewName] <String>] [[-SnapshotsEnabled] <Boolean>] [-Force] [-Confirm]
[-WhatIf]
Set-WssDrive [-ID] <Guid> [[-NewName] <String>] [[-SnapshotsEnabled] <Boolean>] [-Force] [-Confirm] [-WhatIf]
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.
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.
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
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
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
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
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
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
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
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