Set-IscsiVirtualDisk
Modifies the settings for the specified iSCSI virtual disk.
Syntax
Set-IscsiVirtualDisk
[-Path] <String>
[-Description <String>]
[-PassThru]
[-Enable <Boolean>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
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
PS C:\> Set-IscsiVirtualDisk -Path "E:\Temp\vhd1.vhd" -Description "disk for data"
This example changes the VHD description to disk for data.
EXAMPLE 2
PS C:\> Set-IscsiVirtualDisk -Path "E:\Temp\vhd1.vhd" -Enable $false
This example disables the VHD with the path E:\Temp\vhd1.vhd.
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Credential
Specifies the credentials when connecting to a remote computer.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Description
Specifies the description for the iSCSI virtual disk.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Enable
Specifies that the specified iSCSI virtual disk is either enabled or disabled.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputObject
Accepts an iSCSI virtual disk object from the input pipeline.
Type: | IscsiVirtualDisk |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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 using this parameter.
Type: | String |
Aliases: | DevicePath |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk
Outputs
Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for