Get-SCStorageDisk

Get-SCStorageDisk

Gets a storage disk object for the specified host from the VMM database.

構文

Parameter Set: NoFilter
Get-SCStorageDisk [[-Name] <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: FilterByVMHost
Get-SCStorageDisk [[-Name] <String> ] -VMHost <Host> [ <CommonParameters>]

詳細説明

The Get-SCStorageDisk cmdlet gets one or more storage disk objects for the specified host from the Virtual Machine Manager (VMM) database. You can use this cmdlet with the New-SCVirtualDiskDrive cmdlet to attach a pass-through disk on a virtual machine to a physical hard disk on the host on which that virtual machine is deployed.

パラメーター

-Name<String>

Specifies the name of a VMM object.

エイリアス

none

必須?

false

位置は?

1

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMHost<Host>

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, type Get-Help Add-SCVMHost -detailed. See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • StorageDisk

Example Example 1: Get all hard disk drives on the specified host.

The first command gets the host object named VMHost01, and then stores the object in the $VMHost variable.

The second command gets all hard disk drive objects from the host stored in $VMHost, and then displays information about those objects.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> Get-SCStorageDisk -VMHost $VMHost

Example Example 2.: Get a specific hard disk drive on the host by name.:

The first command gets the host object named VMHost02, and then uses the pipeline operator to pass VMHost02 to the Get-SCStorageDisk cmdlet. That cmdlet gets the hard disk drive object named PhysicalDrive0 for the host. The command then stores the hard disk drive object in the $StorageDisk variable.

The second command displays the contents of $StorageDisk.

PS C:\> $StorageDisk = Get-SCVMHost -ComputerName "VMHost02.Contoso.com" | Get-SCStorageDisk -Name "\\.\PhysicalDrive0"
PS C:\> $StorageDisk

関連トピック

New-SCVirtualDiskDrive

Mount-SCStorageDisk

Add-SCVMHost

Get-SCVMHost