Export (0) Print
Expand All
Expand Minimize

Set-SCVMConfiguration

Updated: April 29, 2014

Applies To: System Center 2012 R2 Virtual Machine Manager

Set-SCVMConfiguration

Modifies the virtual machine configuration for a computer tier.

Syntax

Parameter Set: Update
Set-SCVMConfiguration [-VMConfiguration] <BaseVMConfiguration> [-AvailabilitySetNames <List<String>> ] [-CapabilityProfile <CapabilityProfile> ] [-ComputerName <String> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-NoConnectedHost] [-PinVMHost <Boolean> ] [-PinVMLocation <Boolean> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-Tag <String> ] [-VMLocation <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: Cloud
Set-SCVMConfiguration [-VMConfiguration] <BaseVMConfiguration> -Cloud <Cloud> [-AvailabilitySetNames <List<String>> ] [-CapabilityProfile <CapabilityProfile> ] [-ComputerName <String> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-NoConnectedHost] [-PinVMHost <Boolean> ] [-PinVMLocation <Boolean> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-Tag <String> ] [-VMLocation <String> ] [ <CommonParameters>]

Parameter Set: VMHost
Set-SCVMConfiguration [-VMConfiguration] <BaseVMConfiguration> -VMHost <Host> [-AvailabilitySetNames <List<String>> ] [-CapabilityProfile <CapabilityProfile> ] [-ComputerName <String> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-NoConnectedHost] [-PinVMHost <Boolean> ] [-PinVMLocation <Boolean> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-Tag <String> ] [-VMLocation <String> ] [ <CommonParameters>]

Parameter Set: VMHostGroup
Set-SCVMConfiguration [-VMConfiguration] <BaseVMConfiguration> [-AvailabilitySetNames <List<String>> ] [-CapabilityProfile <CapabilityProfile> ] [-ComputerName <String> ] [-CostCenter <String> ] [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-NoConnectedHost] [-PinVMHost <Boolean> ] [-PinVMLocation <Boolean> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-Tag <String> ] [-VMHostGroup <HostGroup> ] [-VMLocation <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]




Detailed 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.

Parameters

-AvailabilitySetNames<List<String>>

Specifies a list of availability set names.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CapabilityProfile<CapabilityProfile>

Specifies a capability profile object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Cloud<Cloud>

Specifies a private cloud object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:

-- FQDN
-- IPv4 or IPv6 address
-- NetBIOS name

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CostCenter<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoConnectedHost

Removes the host from a virtual machine configuration.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PinVMHost<Boolean>

Indicates whether the virtual machine host chosen by the user is retained during service deployment configuration.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PinVMLocation<Boolean>

Indicates whether the virtual machine location chosen by the user is retained during service deployment configuration.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Tag<String>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMConfiguration<BaseVMConfiguration>

Specifies a virtual machine configuration object.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

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?

false

Accept Wildcard Characters?

false

-VMHostGroup<HostGroup>

Specifies a virtual machine host group object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMLocation<String>

Specifies the path to a virtual machine.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

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.

  • VMConfiguration

Examples

Example 1: Update the virtual machine configuration for a machine tier prior to deploying the service

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

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

The third command gets the virtual machine configuration for the computer tier configuration stored in $TierConfig, and then 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.


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"

Example 2: Configure the virtual machine configuration object for a machine tier to pin the host for a virtual machine

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

The second command gets the computer tier configuration object for the service configuration stored in $ServiceConfig, and then 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 then stores the objects in the $VMConfig variable.

The last command sets the PinVMHost property 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.


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

Example 3: Configure the virtual machine configuration object for a service in a private cloud

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

The second command gets the computer tier configuration for the service configuration stored in $ServiceConfig, and then 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 then stores the objects in the $VMConfig variable.

The fourth command gets the private cloud object named Production, and then 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.


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"

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft