Modifier

Partager via


Set-VirtualDisk

Modifies the attributes of an existing 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.

Parameters

-Access

Manages access permissions to the VirtualDisk object.

Type:Access
Accepted values:Unknown, Readable, Writeable, ReadWrite, WriteOnce
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CimSession

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FriendlyName

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
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-InputObject

Specifies the input object that is used in a pipeline command.

Type:CimInstance[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IsManualAttach

Specifies that the object is set as manual-attach.

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

-Name

Specifies the name of the virtual disk to modify.

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

-NewFriendlyName

Specifies the new name of the virtual disk.

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

-OtherUsageDescription

Specifies the usage of this object.

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

-StorageNodeName

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ThrottleLimit

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UniqueId

Specifies the unique ID of the virtual disk to modify.

Type:String
Aliases:Id
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Usage

Specifies the intended usage.

Type:Usage
Accepted values:Other, Unrestricted, ReservedForComputerSystem, ReservedForReplicationServices, ReservedForMigrationServices, LocalReplicaSource, RemoteReplicaSource, LocalReplicaTarget, RemoteReplicaTarget, LocalReplicaSourceOrTarget, RemoteReplicaSourceOrTarget, DeltaReplicaTarget, ElementComponent, ReservedAsPoolContributer, CompositeVolumeMember, CompositeVirtualDiskMember, ReservedForSparing
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

CimInstance

You can use the pipeline operator to pass an MSFT_VirtualDisk object to the InputObject parameter.

Outputs

None

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).