Set-Virtual
Disk
Syntax
Set-VirtualDisk
[-NewFriendlyName <String>]
[-Usage <Usage>]
[-OtherUsageDescription <String>]
-UniqueId <String>
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
[-InputObject] <CimInstance[]>
[-IsManualAttach <Boolean>]
[-StorageNodeName <String>]
[-Access <Access>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
[-InputObject] <CimInstance[]>
[-NewFriendlyName <String>]
[-Usage <Usage>]
[-OtherUsageDescription <String>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
[-NewFriendlyName <String>]
[-Usage <Usage>]
[-OtherUsageDescription <String>]
-Name <String>
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
[-NewFriendlyName <String>]
[-Usage <Usage>]
[-OtherUsageDescription <String>]
[-FriendlyName] <String>
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
-UniqueId <String>
[-IsManualAttach <Boolean>]
[-StorageNodeName <String>]
[-Access <Access>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
[-FriendlyName] <String>
[-IsManualAttach <Boolean>]
[-StorageNodeName <String>]
[-Access <Access>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Set-VirtualDisk
-Name <String>
[-IsManualAttach <Boolean>]
[-StorageNodeName <String>]
[-Access <Access>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Description
The Set-VirtualDisk cmdlet modifies the attributes of an existing virtual disk.
Examples
EXAMPLE 1
PS C:\>Set-VirtualDisk -FriendlyName VirtualDisk1 -NewFriendlyName "Storage For Contoso"
This example changes the friendly name of a virtual disk.
EXAMPLE 2
PS C:\>Set-VirtualDisk -FriendlyName "Storage For Contoso" -IsManualAttach $False
This example attaches a virtual disk that is currently set to manual-attach.
Required Parameters
Specifies a friendly name for a disk. The friendly name may be defined by a user and is not guaranteed to be unique.
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the input object that is used in a pipeline command.
Type: | CimInstance[] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
Specifies the name of the virtual disk to modify.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the unique ID of the virtual disk to modify.
Type: | String |
Aliases: | Id |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Optional Parameters
Manages access permissions to the VirtualDisk object.
Type: | Access |
Parameter Sets: | Unknown, Readable, Writeable, ReadWrite, WriteOnce |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Aliases: | Session |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies that the object is set as manual-attach.
Type: | Boolean |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the new name of the virtual disk.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the usage of this object.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the computer on which to run the cmdlet.
Use this parameter only when you run the cmdlet from a management node to modify a virtual disk on a remote cluster subsystem for the purpose of setting the manual-attach attribute of the virtual disk. Specify the IsManualAttach parameter to set the manual-attach attribute of the virtual disk.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of
0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the intended usage.
Type: | Usage |
Parameter Sets: | Other, Unrestricted, ReservedForComputerSystem, ReservedForReplicationServices, ReservedForMigrationServices, LocalReplicaSource, RemoteReplicaSource, LocalReplicaTarget, RemoteReplicaTarget, LocalReplicaSourceOrTarget, RemoteReplicaSourceOrTarget, DeltaReplicaTarget, ElementComponent, ReservedAsPoolContributer, CompositeVolumeMember, CompositeVirtualDiskMember, ReservedForSparing |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk
You can use the pipeline operator to pass an MSFT_VirtualDisk object to the InputObject parameter.
Outputs
None