Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Get-SCStorageDisk

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Get-SCStorageDisk

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

Syntax

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

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




Detailed Description

The Get-SCStorageDisk cmdlet gets one or more storage disk objects for the specified host from the System Center 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.

For more information about Get-SCStorageDisk, type: "Get-Help Get-SCStorageDisk -online".

Parameters

-Name<String>

Specifies the name of a VMM object.


Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • StorageDisk

Examples

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

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

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


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

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

The first command gets the host object named VMHost02 and uses the pipeline operator to pass VMHost02 to the Get-SCStorageDisk cmdlet which 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 to the user.


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

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.