Get-SCVMConfiguration

Gets the virtual machine configuration information for a service configuration or computer tier configuration.

Syntax

Get-SCVMConfiguration
   [-VMMServer <ServerConnection>]
   -ComputerTierConfiguration <BaseComputerTierConfiguration>
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Get-SCVMConfiguration
   [-VMMServer <ServerConnection>]
   -ServiceConfiguration <ServiceConfiguration>
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Get-SCVMConfiguration
   [-VMMServer <ServerConnection>]
   [-All]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]
Get-SCVMConfiguration
   [-VMMServer <ServerConnection>]
   [-ID <Guid>]
   [-OnBehalfOfUser <String>]
   [-OnBehalfOfUserRole <UserRole>]
   [<CommonParameters>]

Description

The Get-SCVMConfiguration cmdlet gets virtual machine configuration information for a service configuration or computer tier configuration.

Examples

Example 1: Get all configuration information for a virtual machine within a computer tier configuration

PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01" 
PS C:\> $TierConfig = Get-SCComputerTierConfiguration -ServiceConfiguration $ServiceConfig
PS C:\> $VMConfig = Get-SCVMConfiguration -ComputerTierConfiguration $TierConfig
PS C:\> $VMConfig

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 last command displays the properties of the virtual machine configuration stored in $VMConfig to the user.

Example 2: Get all configuration information for a virtual machine within a service configuration

PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01"
PS C:\> $VMConfigs = Get-SCVMConfiguration -ServiceConfiguration $ServiceConfig
PS C:\> $VMConfigs

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

The second command gets all virtrual machine configurations for the service configuration stored in $ServiceConfig and stores the objects in the $VMConfigs variable.

The last command displays the properties of the virtual machine configurations stored in $VMConfigs to the user.

Parameters

-All

Indicates that this cmdlet gets all subordinate objects independent of the parent object. For example, the command Get-SCVirtualDiskDrive -All gets all virtual disk drive objects regardless of the virtual machine object or template object that each virtual disk drive object is associated with.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputerTierConfiguration

Specifies a computer tier configuration object.

Type:BaseComputerTierConfiguration
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ID

Specifies the numerical identifier as a globally unique identifier, or GUID, for a specific object.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUser

Specifies a user name. This cmdlet operates on behalf of the user that this parameter specifies.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-OnBehalfOfUserRole

Specifies a user role. This cmdlet sets the on behalf of user role as the user role that this parameter specifies. To obtain a user role object, use the Get-SCUserRole cmdlet.

Type:UserRole
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServiceConfiguration

Specifies a service configuration object.

Type:ServiceConfiguration
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Outputs

VMConfiguration

This cmdlet returns a VMConfiguration object.