Get-SCStorageVolume

Get-SCStorageVolume

Gets a storage volume object from a host managed by VMM.

構文

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

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

Parameter Set: StorageVolumeByLibraryServer
Get-SCStorageVolume [[-Name] <String> ] -LibraryServer <LibraryServer> [ <CommonParameters>]

Parameter Set: StorageVolumeByStorageArray
Get-SCStorageVolume [[-Name] <String> ] -StorageArray <StorageArray> [ <CommonParameters>]

詳細説明

The Get-SCStorageVolume cmdlet gets one or more storage volume objects from a host managed by Virtual Machine Manager (VMM).

The information returned includes, but is not limited to, the following:

-- Name. The name of each host volume, such as C:\, D:\, or E:\.
-- StorageVolumeID. The volume ID, a GUID, for each host volume. The host volume ID is unique across your VMM environment.
-- MountPoints. The mount points for each volume. A single volume, such as C:\, can contain multiple mount points.
-- Capacity. The storage capacity of each volume.
-- FreeSpace. The amount of free space on each volume.
-- VolumeLabel. A user-defined label for this volume, if any.
-- IsSANMigrationPossible. A flag indicating whether or not SAN migration is available.
-- IsClustered. A flag indicating whether the volume is local storage or shared storage (that is, uses external storage, such as SAN or iSCSI) and a clustered disk resource exists for this volume.
-- InUse. A flag that is set to True when one of the highly available virtual machines managed by VMM is using this volume.
-- VMHost. The FQDN name of the host on which each volume resides.
-- IsAvailableForPlacement. A flag indicating whether this volume is available as a location on which to deploy virtual machines on this host.
-- ServerConnection. The VMM server connection that is managing the host that this volume belongs to.
-- ID. The ID, a GUID, for each volume.

パラメーター

-LibraryServer<LibraryServer>

Specifies a VMM library server object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

false

-Name<String>

Specifies the name of a VMM object.

エイリアス

none

必須?

false

位置は?

1

既定値

none

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

false

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

false

-StorageArray<StorageArray>

Specifies a storage array object. This can be a Fibre Channel or iSCSI storage sub-system that is used to store virtual machine configuration and virtual disks.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

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)。

入力

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

出力

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

  • StorageVolume

Example 1: Get all volumes on the specified host server

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

The second command gets all drive volume objects from VMHost01, and then displays information about these volumes to the user.

Note: To translate the capacity and free space from bytes into larger units of measure, divide the number of bytes by 1024 to get kilobytes (KB); divide the result by 1024 to get megabytes (MB); and divide that result by 1024 to get gigabytes (GB).

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

Example 2: Get the specified volume on a host

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

The second command gets the drive volume named C:\ from VMHost02 and displays information about this volume.

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost02.Contoso.com"
PS C:\> Get-SCStorageVolume -VMHost $VMHost -Name "C:\" 

Example Example 3: Get all volumes on VMware ESX hosts that contain the string "SharedStorage" in the volume name.

The first command gets all host objects from VMMServer01, selects only those host objects whose virtualization platform is VMware ESX, and then stores those host objects in $VMHost.

Note: This example assumes that the names of all volumes on these ESX Servers include the string storage, but that only some of those volume names include the string SharedStorage.

The second command passes each ESX host object in $VMHost to the Get-SCVMStorageVolume cmdlet, which gets the volume objects on these hosts and then, in turn, passes the volume objects to select, the alias for the Select-Object cmdlet. The Select-Object cmdlet displays the volume name and the host that volume resides on for those volumes whose name contains the string SharedStorage.

PS C:\> $VMHost = Get-SCVMHost -VMMServer "VMMServer01.Contoso.com" | where { $_.VirtualizationPlatform -eq "VMwareESX" }
PS C:\> $VMHost | Get-SCStorageVolume | select -property Name, VMHost | where { $_.Name -match "SharedStorage" }

関連トピック

Add-SCVMHost

Get-SCVMHost

Set-SCStorageVolume