Modifica

Condividi tramite


Import-IscsiVirtualDisk

Adds an iSCSI Virtual Disk object using an existing virtual hard disk (VHD) file.

Syntax

Default (Default)

Import-IscsiVirtualDisk
    [-Description <String>]
    [-Path] <String>
    [-PassThru]
    [-ComputerName <String>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

Description

The Import-IscsiVirtualDisk cmdlet adds an iSCSI Virtual Disk object using an existing virtual hard disk (VHD) file. This cmdlet imports virtual disks in both VHD and VHDX formats. The New-IscsiVirtualDisk cmdlet creates virtual disks in the VHDX format only.

Examples

Example 1: Create a virtual disk for a VHD file

PS C:\> Import-IscsiVirtualDisk -Path "E:\Temp\test.vhd" -Description "Migrated from fs1"

This example creates a Virtual Disk object for an existing VHD file located at E:\Temp\test.vhd and sets the Virtual Disk object description to Migrated from fs1.

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.

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

-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 VHD file that is associated with the iSCSI virtual disk. Filter the iSCSI Virtual Disk object using this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DevicePath

Parameter sets

(All)
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.

Inputs

None

Outputs

Microsoft.Iscsi.Target.Commands.IscsiVirtualDisk