Set-IscsiVirtualDisk
Modifies the settings for the specified iSCSI virtual disk.
Syntax
DevicePath (Default)
Set-IscsiVirtualDisk
[-Path] <String>
[-Description <String>]
[-PassThru]
[-Enable <Boolean>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
InputObject
Set-IscsiVirtualDisk
-InputObject <IscsiVirtualDisk>
[-Description <String>]
[-PassThru]
[-Enable <Boolean>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The Set-IscsiVirtualDisk cmdlet modifies the settings for a virtual disk and returns the corresponding iSCSI Virtual Disk object, if the PassThru parameter is specified.
Examples
Example 1: Change a VHD description
PS C:\> Set-IscsiVirtualDisk -Path "E:\Temp\vhd1.vhdx" -Description "disk for data"
This example changes the VHD description to disk for data.
Example 2: Disable a VHD
PS C:\> Set-IscsiVirtualDisk -Path "E:\Temp\vhd1.vhdx" -Enable $False
This example disables the VHD with the path E:\Temp\vhd1.vhdx.
Parameters
-ComputerName
Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.
Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.
If you do not specify a value for this parameter, the cmdlet uses the local computer.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Credential
Specifies the credentials when connecting to a remote computer.
Parameter properties
Type: | PSCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Description
Specifies the description for the iSCSI virtual disk.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Enable
Specifies that the specified iSCSI virtual disk is either enabled or disabled.
Parameter properties
Type: | Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-InputObject
Accepts an iSCSI virtual disk object from the input pipeline.
Parameter properties
Type: | IscsiVirtualDisk |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
InputObject
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Path
Specifies the path of the virtual hard disk (VHD) file that is associated with the iSCSI virtual disk. Filter the iSCSI Virtual Disk object by using this parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | DevicePath |
Parameter sets
DevicePath
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.