Set-SCVMConfiguration

Modifies the virtual machine configuration for a computer tier.

Description

The Set-SCVMConfiguration cmdlet modifies the virtual machine configuration for a computer tier. The virtual machine configuration describes how the virtual machine will be configured when the service is deployed.

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

Parameters

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual machine configuration object.

Cloud

Required? true
Accept Pipeline Input? false
Position? named
Specifies a private cloud object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

CapabilityProfile

Required? false
Accept Pipeline Input? false
Position? named
Specifies a capability profile object.

ComputerName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.

NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.

CostCenter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

NoConnectedHost

Required? false
Accept Pipeline Input? false
Position? named
Removes the host from a virtual machine configuration.

PinVMHost

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine host chosen by the user is retained during service deployment configuration.

PinVMLocation

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine location chosen by the user is retained during service deployment configuration.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

Tag

Required? false
Accept Pipeline Input? false
Position? named
Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

VMLocation

Required? false
Accept Pipeline Input? false
Position? named
Specifies the path to a virtual machine.

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual machine configuration object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

CapabilityProfile

Required? false
Accept Pipeline Input? false
Position? named
Specifies a capability profile object.

ComputerName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.

NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.

CostCenter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

NoConnectedHost

Required? false
Accept Pipeline Input? false
Position? named
Removes the host from a virtual machine configuration.

PinVMHost

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine host chosen by the user is retained during service deployment configuration.

PinVMLocation

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine location chosen by the user is retained during service deployment configuration.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

Tag

Required? false
Accept Pipeline Input? false
Position? named
Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

VMLocation

Required? false
Accept Pipeline Input? false
Position? named
Specifies the path to a virtual machine.

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual machine configuration object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

CapabilityProfile

Required? false
Accept Pipeline Input? false
Position? named
Specifies a capability profile object.

ComputerName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.

NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.

CostCenter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

NoConnectedHost

Required? false
Accept Pipeline Input? false
Position? named
Removes the host from a virtual machine configuration.

PinVMHost

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine host chosen by the user is retained during service deployment configuration.

PinVMLocation

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine location chosen by the user is retained during service deployment configuration.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

Tag

Required? false
Accept Pipeline Input? false
Position? named
Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

VMHost

Required? false
Accept Pipeline Input? false
Position? named
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.

VMLocation

Required? false
Accept Pipeline Input? false
Position? named
Specifies the path to a virtual machine.

VMConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a virtual machine configuration object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

VMHostGroup

Required? true
Accept Pipeline Input? false
Position? named
Specifies a virtual machine host group object or an array of host group objects.

CapabilityProfile

Required? false
Accept Pipeline Input? false
Position? named
Specifies a capability profile object.

ComputerName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.

NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.

CostCenter

Required? false
Accept Pipeline Input? false
Position? named
Specifies the cost center for a virtual machine so that you can collect data about the allocation of virtual machines (or resources allocated to virtual machines) to make use of in your billing system.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

NoConnectedHost

Required? false
Accept Pipeline Input? false
Position? named
Removes the host from a virtual machine configuration.

PinVMHost

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine host chosen by the user is retained during service deployment configuration.

PinVMLocation

Required? false
Accept Pipeline Input? false
Position? named
Indicates whether the virtual machine location chosen by the user is retained during service deployment configuration.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

Tag

Required? false
Accept Pipeline Input? false
Position? named
Specifies a word or phrase to associate with an object so that you can search for all objects with the specified set of tags. You can search for a subset of tags, or you can search for the full set of tags.

VMLocation

Required? false
Accept Pipeline Input? false
Position? named
Specifies the path to a virtual machine.

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Examples

1. Update the virtual machine configuration for a machine tier prior to deploying the service.
PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01"
PS C:\> $TierConfig = Get-SCComputerTierConfiguration -ServiceConfiguration $ServiceConfig
PS C:\> $VMConfig = Get-SCVMConfiguration -ComputerTierConfiguration $TierConfig
PS C:\> Set-SCVMConfiguration -VMConfiguration $VMConfig[0] -Description "This is the updated virtual machine configuration"
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 variable in the $VMConfig variable.

The last command sets the description property of the first virtual machine configuration object stored in $VMConfig, and displays the properties of the virtual machine configuration to the user. 
2. Configure the virtual machine configuration object for a machine tier to pin the host for a virtual machine.
PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01" 
PS C:\> $TierConfig = Get-SCComputerTierConfiguration -ServiceConfiguration $ServiceConfig 
PS C:\> $VMConfig = Get-SCVMConfiguration -ComputerTierConfiguration $TierConfig
PS C:\> Set-SCVMConfiguration -VMConfiguration $VMConfig[0] -PinVMHost $True
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 object for the service configuration stored in $ServiceConfig and stores the object in the $TierConfig variable.

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

The last command sets the PinVMHost propety to True for the first virtual machine configuration object stored in $VMConfig. Therefore, when the service is deployed, the host for the virtual machine created with this configuration will not be changed.
3. Configure the virtual machine configuration object for a service in a private cloud.
PS C:\> $ServiceConfig = Get-SCServiceConfiguration -Name "Service01"
PS C:\> $TierConfig = Get-SCComputerTierConfiguration -ServiceConfiguration $ServiceConfig 
PS C:\> $VMConfig = Get-SCVMConfiguration -ComputerTierConfiguration $TierConfig
PS C:\> $Cloud = Get-SCCloud -Name "Production"
PS C:\> Set-SCVMConfiguration -VMConfiguration $VMConfig[1] -Cloud $Cloud -Description "This is the new virtual machine configuration"
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 objects for the computer tier configuration stored in $TierConfig and stores the objects in the $VMConfig variable.

The fourth command gets the private cloud object named Production and stores the object in the $Cloud variable.

The last command updates the description for the second virtual machine configuration object stored in $VMConfig for the private cloud stored in $Cloud.

See Also