Share via


Get-SCVirtualHardDiskConfiguration

Gets the virtual hard disk configuration contained within a virtual machine configuration.

Syntax

Default (Default)

Get-SCVirtualHardDiskConfiguration
    [-VMMServer <ServerConnection>]
    -VMConfiguration <VMConfiguration>
    [<CommonParameters>]

Description

The Get-SCVirtualHardDiskConfiguration cmdlet gets the virtual hard disk configuration information that is contained within a virtual machine configuration.

Examples

Example 1: Get the virtual hard disk configuration for a virtual machine configuration

PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01"
PS C:\> $TierConfig = Get-SCComputerTierConfiguration -ServiceConfiguration $ServiceConfig
PS C:\> $VMConfig = Get-SCVMConfiguration -ComputerTierConfiguration $TierConfig
PS C:\> $VHDConfig = Get-SCVirtualHardDiskConfiguration -VMConfiguration $VMConfig[0]
PS C:\> $VHDConfig

The first command gets the service configuration object named Service01 and stores the object in the $ServiceConfig variable.

The second command gets the computer tier configuration for the service configuration stored in $ServiceConfig and stores the object in the $TierConfig variable.

The third command gets the virtual machine configuration for the computer tier configuration stored in $TierConfig and stores the object in the $VMConfig variable.

The fourth command gets the virtual hard disk configuration for the first virtual machine configuration stored in $VMConfig.

The last command displays the properties of the virtual hard disk configuration stored in $VMConfig to the user.

Parameters

-VMConfiguration

Specifies a virtual machine configuration object.

Parameter properties

Type:VMConfiguration
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a Virtual Machine Manager (VMM) server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
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.

Outputs

VirtualHardDiskConfiguration

This cmdlet returns a VirtualHardDiskConfiguration object.