Set-SCGuestOSProfile

Changes the properties of a guest operating system profile used in VMM.

Description

The Set-SCGuestOSProfile changes one or more properties of a guest operating system profile used in a System Center Virtual Machine Manager (VMM) environment. Changes made to a guest operating system profile affect only the guest operating system profile itself. Changes do not affect any existing virtual machines that were previously created by using this profile. 

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

Parameters

GuestOSProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a guest operating system profile object. 

DomainJoinCredential

Required? true
Accept Pipeline Input? false
Position? named
Specifies the user name and password of an account with permission to join a computer to the domain. A limited rights account should be used for joining computers (either physical or virtual) to the domain.

Example format for a PS credential: 
$DomainJoinCredential = Get-Credenital
-Domain "ThisDomain.Corp.Contoso.com" -DomainJoinCredential $DomainJoinCredential

Example format for a Run As account:
$DomainJoinCredential = Get-SCRunAsAccount -Name "RunAsAcct01"
-Domain "ThisDomain.Corp.Contoso.com" -DomainJoinCredential $DomainJoinCredential

NOTE: You can use the DomainJoinCredential parameter to specify credentials (on a VMHostProfile) for joining a physical host computer to the domain, or to specify credentials (on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine) for joining a virtual machine to the domain.

AnswerFile

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a script object stored in the VMM library to use as an answer file. The name of the answer file script depends on the operating system that you want to install on a virtual machine:

 ANSWER FILE	GUEST OS TO INSTALL ON VM
 -----------	-------------------------
 Sysprep.inf	Windows XP, Windows Server 2000, or Windows Server 2003
 Unattend.xml   Windows Vista, Windows 7, or Windows Server 2008 

AutoLogonCount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of times that Windows should automatically log the administrator denoted in the Answerr File on to the console session.

AutoLogonCredential

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Run As account contained in the Answer File that Windows uses to log on to the console session when automatic administrator logon is enabled.

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.

Description

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

DisableAutoLogon

Required? false
Accept Pipeline Input? false
Position? named
Disables automatic administrator logon.

Domain

Required? false
Accept Pipeline Input? false
Position? named
Specifies a fully qualified domain name (FQDN) for an Active Directory domain. 

Example format: -Domain "Domain01.Corp.Contoso.com"

DomainJoinOrganizationalUnit

Required? false
Accept Pipeline Input? false
Position? named
Specifies the organizational unit to which the computer is joined during an unattended mini-setup.

FullName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of the person in whose name a virtual machine is registered. 

GuiRunOnceCommands

Required? false
Accept Pipeline Input? false
Position? named
Specifies one or more commands to add to the [GuiRunOnce] section of an unattended answer file (such as Unattend.xml). Use single quotes around each string enclosed in double quotes.

Example format:
-GuiRunOnceCommands '"C:\APF\APFPostSysPrepCopy.cmd PARAMS1"', '"C:\APF\APFPostSysPrepCopy.cmd PARAMS1"'

For information about how Windows PowerShell uses quotes, type: "Get-Help about_Quoting_Rules"

JobVariable

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

LocalAdministratorCredential

Required? false
Accept Pipeline Input? false
Position? named
Specifies the user name and password for the local Administrator account. Specifying credentials on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine overrides any existing Administrator password.

MergeAnswerFile

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the cmdlet merge the specified answer file with the specified guest operating system settings. The default value is TRUE. This parameter is used by the VMM console. You do not need to use this parameter at the command prompt.

Name

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

OperatingSystem

Required? false
Accept Pipeline Input? false
Position? named
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".

OrganizationName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of the organization for the person in whose name a virtual machine is registered. 

Owner

Required? false
Accept Pipeline Input? false
Position? named
Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"

ProductKey

Required? false
Accept Pipeline Input? false
Position? named
Specifies a product key. The product key is a 25-digit number that identifies the product license. A product key can be used to register VMM or an operating system to be installed on a virtual machine or host.

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.

RemoveDomainJoinOrganizationalUnit

Required? false
Accept Pipeline Input? false
Position? named
Removes the organizational unit that the computer joined during setup.

RemoveServerFeatures

Required? false
Accept Pipeline Input? false
Position? named
Removes all server roles and features from a template.

RunAsynchronously

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

TimeZone

Required? false
Accept Pipeline Input? false
Position? named
Specifies a number (an index) that identifies a geographical region that shares the same standard time. For a list of time zone indexes, see "Microsoft Time Zone Index Values" at: http://go.microsoft.com/fwlink/?LinkId=120935. If no time zone is specified, the default time zone used for a virtual machine is the same time zone setting that is on the virtual machine host.

Example format to specify the GMT Standard Time zone: -TimeZone 085

UnattendSettings

Required? false
Accept Pipeline Input? false
Position? named
Key Value pairs of String, String

UserRole

Required? false
Accept Pipeline Input? false
Position? named
Specifies a user role object.

GuestOSProfile

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a guest operating system profile object. 

AnswerFile

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a script object stored in the VMM library to use as an answer file. The name of the answer file script depends on the operating system that you want to install on a virtual machine:

 ANSWER FILE	GUEST OS TO INSTALL ON VM
 -----------	-------------------------
 Sysprep.inf	Windows XP, Windows Server 2000, or Windows Server 2003
 Unattend.xml   Windows Vista, Windows 7, or Windows Server 2008 

AutoLogonCount

Required? false
Accept Pipeline Input? false
Position? named
Specifies the number of times that Windows should automatically log the administrator denoted in the Answerr File on to the console session.

AutoLogonCredential

Required? false
Accept Pipeline Input? false
Position? named
Specifies the Run As account contained in the Answer File that Windows uses to log on to the console session when automatic administrator logon is enabled.

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.

Description

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

DisableAutoLogon

Required? false
Accept Pipeline Input? false
Position? named
Disables automatic administrator logon.

DomainJoinOrganizationalUnit

Required? false
Accept Pipeline Input? false
Position? named
Specifies the organizational unit to which the computer is joined during an unattended mini-setup.

FullName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of the person in whose name a virtual machine is registered. 

GuiRunOnceCommands

Required? false
Accept Pipeline Input? false
Position? named
Specifies one or more commands to add to the [GuiRunOnce] section of an unattended answer file (such as Unattend.xml). Use single quotes around each string enclosed in double quotes.

Example format:
-GuiRunOnceCommands '"C:\APF\APFPostSysPrepCopy.cmd PARAMS1"', '"C:\APF\APFPostSysPrepCopy.cmd PARAMS1"'

For information about how Windows PowerShell uses quotes, type: "Get-Help about_Quoting_Rules"

JobVariable

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

LocalAdministratorCredential

Required? false
Accept Pipeline Input? false
Position? named
Specifies the user name and password for the local Administrator account. Specifying credentials on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine overrides any existing Administrator password.

MergeAnswerFile

Required? false
Accept Pipeline Input? false
Position? named
Specifies that the cmdlet merge the specified answer file with the specified guest operating system settings. The default value is TRUE. This parameter is used by the VMM console. You do not need to use this parameter at the command prompt.

Name

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

OperatingSystem

Required? false
Accept Pipeline Input? false
Position? named
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type: "Get-SCOperatingSystem".

OrganizationName

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of the organization for the person in whose name a virtual machine is registered. 

Owner

Required? false
Accept Pipeline Input? false
Position? named
Specifies the owner of a VMM object in the form of a valid domain user account.

Example format: -Owner "Contoso\ReneeLo"
Example format: -Owner "ReneeLo@Contoso"

ProductKey

Required? false
Accept Pipeline Input? false
Position? named
Specifies a product key. The product key is a 25-digit number that identifies the product license. A product key can be used to register VMM or an operating system to be installed on a virtual machine or host.

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.

RemoveDomainJoinOrganizationalUnit

Required? false
Accept Pipeline Input? false
Position? named
Removes the organizational unit that the computer joined during setup.

RemoveServerFeatures

Required? false
Accept Pipeline Input? false
Position? named
Removes all server roles and features from a template.

RunAsynchronously

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

TimeZone

Required? false
Accept Pipeline Input? false
Position? named
Specifies a number (an index) that identifies a geographical region that shares the same standard time. For a list of time zone indexes, see "Microsoft Time Zone Index Values" at: http://go.microsoft.com/fwlink/?LinkId=120935. If no time zone is specified, the default time zone used for a virtual machine is the same time zone setting that is on the virtual machine host.

Example format to specify the GMT Standard Time zone: -TimeZone 085

UnattendSettings

Required? false
Accept Pipeline Input? false
Position? named
Key Value pairs of String, String

UserRole

Required? false
Accept Pipeline Input? false
Position? named
Specifies a user role object.

Workgroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies on a new or existing template, on a new or existing guest operating system profile, or on a new virtual machine the name of the workgroup to which you want to join a virtual machine. You can use this parameter to override the existing value on a template or on a guest operating system profile.
Requires a VMM guest OS profile object, which can be retrieved by using the Get-SCGuestOSProfile cmdlet. 

Examples

1: Specify an organization name for an existing guest operating system profile.
PS C:\> $OSProfile = Get-SCGuestOSProfile -Name "NewOSProfile01"
PS C:\> Set-SCGuestOSProfile -GuestOSProfile $OSProfile -OrgName "Contoso"
The first command gets the guest OS profile object named NewOSProfile01 and stores the object in the $OSProfile variable.

The second command sets Contoso as the organization name for the guest operating system profile stored in $OSProfile.

See Also