Set-SCGuestOSProfile
Set-SCGuestOSProfile
Changes the properties of a guest operating system profile used in VMM.
構文
Parameter Set: Default
Set-SCGuestOSProfile [-GuestOSProfile] <GuestOSProfile> [-AnswerFile <Script> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-ComputerName <String> ] [-Description <String> ] [-DisableAutoLogon] [-DomainJoinOrganizationalUnit <String> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-LinuxDomainName <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MergeAnswerFile <Boolean> ] [-Name <String> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-TimeZone <Int32]> ] [-UnattendSettings <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-UserRole <UserRole> ] [ <CommonParameters>]
Parameter Set: Domain
Set-SCGuestOSProfile [-GuestOSProfile] <GuestOSProfile> -Domain <String> [-AnswerFile <Script> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-ComputerName <String> ] [-Description <String> ] [-DisableAutoLogon] [-DomainJoinCredential <VMMCredential> ] [-DomainJoinOrganizationalUnit <String> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-LinuxDomainName <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MergeAnswerFile <Boolean> ] [-Name <String> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-TimeZone <Int32]> ] [-UnattendSettings <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-UserRole <UserRole> ] [ <CommonParameters>]
Parameter Set: SSHKeyFile
Set-SCGuestOSProfile [-GuestOSProfile] <GuestOSProfile> [-AnswerFile <Script> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-ComputerName <String> ] [-Description <String> ] [-DisableAutoLogon] [-DomainJoinOrganizationalUnit <String> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-LinuxAdministratorSSHKey <SSHKey> ] [-LinuxDomainName <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MergeAnswerFile <Boolean> ] [-Name <String> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-TimeZone <Int32]> ] [-UnattendSettings <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-UserRole <UserRole> ] [ <CommonParameters>]
Parameter Set: SSHKeyString
Set-SCGuestOSProfile [-GuestOSProfile] <GuestOSProfile> [-AnswerFile <Script> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-ComputerName <String> ] [-Description <String> ] [-DisableAutoLogon] [-DomainJoinOrganizationalUnit <String> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-LinuxAdministratorSSHKeyString <String> ] [-LinuxDomainName <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MergeAnswerFile <Boolean> ] [-Name <String> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-TimeZone <Int32]> ] [-UnattendSettings <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-UserRole <UserRole> ] [ <CommonParameters>]
Parameter Set: Workgroup
Set-SCGuestOSProfile [-GuestOSProfile] <GuestOSProfile> [-AnswerFile <Script> ] [-AutoLogonCount <UInt32> ] [-AutoLogonCredential <RunAsAccount> ] [-ComputerName <String> ] [-Description <String> ] [-DisableAutoLogon] [-DomainJoinOrganizationalUnit <String> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-LinuxDomainName <String> ] [-LocalAdministratorCredential <VMMCredential> ] [-MergeAnswerFile <Boolean> ] [-Name <String> ] [-OperatingSystem <OperatingSystem> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RemoveDomainJoinOrganizationalUnit] [-RemoveServerFeatures] [-RunAsynchronously] [-TimeZone <Int32]> ] [-UnattendSettings <0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]> ] [-UserRole <UserRole> ] [-Workgroup <String> ] [ <CommonParameters>]
詳細説明
The Set-SCGuestOSProfile cmdlet changes one or more properties of a guest operating system profile used in a 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.
パラメーター
-AnswerFile<Script>
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:
-- Sysprep.inf. Windows XP, Windows Server 2000, or Windows Server 2003.
-- Unattend.xml. Windows Vista, Windows 7, or Windows Server 2008.
エイリアス |
SysPrepFile |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-AutoLogonCount<UInt32>
Specifies the number of times that Windows should automatically log the administrator denoted in the Answer File on to the console session.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-AutoLogonCredential<RunAsAccount>
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.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
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.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Description<String>
States a description for the specified object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-DisableAutoLogon
Indicates that this cmdlet disables automatic administrator logon.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Domain<String>
Specifies a fully qualified domain name (FQDN) for an Active Directory domain.
Example format: -Domain "Domain01.Corp.Contoso.com"
エイリアス |
JoinDomain |
必須? |
true |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-DomainJoinCredential<VMMCredential>
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 Windows PowerShell credential:
$DomainJoinCredential = Get-Credential -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.
エイリアス |
JoinDomainCredential |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-DomainJoinOrganizationalUnit<String>
Specifies the organizational unit to which the computer is joined during an unattended mini-setup.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-FullName<String>
Specifies the name of the person in whose name a virtual machine is registered.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-GuestOSProfile<GuestOSProfile>
Specifies a guest operating system profile object.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-GuiRunOnceCommands<String[]>
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
.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-JobVariable<String>
Specifies that job progress is tracked and stored in the variable named by this parameter.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-LinuxAdministratorSSHKey<SSHKey>
Specifies the public key file for a Linux SSH Key.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-LinuxAdministratorSSHKeyString<String>
Specifies, as a string, a Linux administrator SSH key.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-LinuxDomainName<String>
Specifies a fully qualified domain name (FQDN) to be used in conjunction with Linux operating system specialization.
Example format: -LinuxDomainName "Domain01.Corp.Contoso.com"
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-LocalAdministratorCredential<VMMCredential>
Specifies the user name and password for the Local Administrator account (or Linux root account in the case of a Linux compatible Guest Operating System profile).
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.
エイリアス |
AdminPasswordCredential |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-MergeAnswerFile<Boolean>
Indicates whether this cmdlet merges 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.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies the name of a VMM object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-OperatingSystem<OperatingSystem>
Specifies the type of operating system for a virtual machine. To list the names of all available operating systems in VMM, type Get-SCOperatingSystem
.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-OrganizationName<String>
Specifies the name of the organization for the person in whose name a virtual machine is registered.
エイリアス |
OrgName |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Owner<String>
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"
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ProductKey<String>
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.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-PROTipID<Guid]>
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RemoveDomainJoinOrganizationalUnit
Removes the organizational unit that the computer joined during setup.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RemoveServerFeatures
Removes all server roles and features from a template.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-TimeZone<Int32]>
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 (https://go.microsoft.com/fwlink/?LinkId=120935) on the Microsoft Developer Network. 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
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-UnattendSettings<0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
Specifies a key/value pair consisting of string, string.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-UserRole<UserRole>
Specifies a user role object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-Workgroup<String>
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.
エイリアス |
JoinWorkgroup |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- GuestOSProfile
注
- This cmdlet requires a VMM guest OS profile object, which can be retrieved by using the Get-SCGuestOSProfile cmdlet.
例
Example Example 1: Specify an organization name for an existing guest operating system profile.
The first command gets the guest operating system profile object named NewOSProfile01, and then 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.
PS C:\> $OSProfile = Get-SCGuestOSProfile -Name "NewOSProfile01"
PS C:\> Set-SCGuestOSProfile -GuestOSProfile $OSProfile -OrgName "Contoso"
Example Example 2: Specify an SSHKey for an existing Linux guest operating system profile.
The first command gets the guest operating system profile object named MyCentOSProfile, and then stores the object in the $OSProfile variable.
The second command gets the SSHKey object named My.sshkey, and then stores the object in the $sshkey variable.
The last command sets the My.sshkey object on the guest operating system profile stored in $OSProfile.
PS C:\> $OSProfile = Get-SCGuestOSProfile -Name "My CentOS Profile"
PS C:\> $sshkey = Get-SCSSHKey -Name "My.sshkey"
PS C:\> Set-SCGuestOSProfile -GuestOSProfile $OSProfile -LinuxAdministratorSSHKey $sshkey