New-SCPhysicalComputerProfile
New-SCPhysicalComputerProfile
Creates a profile that is used to deploy an operating system to a computer.
Syntax
Parameter Set: CloneProfile
New-SCPhysicalComputerProfile [-Name] <String> -PhysicalComputerProfile <PhysicalComputerProfile> [-AnswerFile <Script> ] [-BypassVHDConversion <Boolean]> ] [-Description <String> ] [-JobVariable <String> ] [-Owner <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: CreateNewFileServerProfile
New-SCPhysicalComputerProfile [-Name] <String> -Domain <String> -DomainJoinRunAsAccount <RunAsAccount> -LocalAdministratorCredential <VMMCredential> -PhysicalComputerNetworkAdapterProfile <PhysicalComputerNetworkAdapterProfile[]> -UseAsFileServer -VirtualHardDisk <VirtualHardDisk> [-AnswerFile <Script> ] [-BypassVHDConversion <Boolean]> ] [-Description <String> ] [-DiskConfiguration <String> ] [-DriverMatchingTag <List`1> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-TimeZone <Int32]> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]
Parameter Set: CreateNewHostProfileData
New-SCPhysicalComputerProfile [-Name] <String> -Domain <String> -DomainJoinRunAsAccount <RunAsAccount> -LocalAdministratorCredential <VMMCredential> -PhysicalComputerNetworkAdapterProfile <PhysicalComputerNetworkAdapterProfile[]> -UseAsVMHost -VirtualHardDisk <VirtualHardDisk> [-AnswerFile <Script> ] [-BypassVHDConversion <Boolean]> ] [-Description <String> ] [-DiskConfiguration <String> ] [-DriverMatchingTag <List`1> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-TimeZone <Int32]> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]
Parameter Set: CreateNewWorkgroupHostProfileData
New-SCPhysicalComputerProfile [-Name] <String> -JoinWorkgroup -LocalAdministratorCredential <VMMCredential> -PhysicalComputerNetworkAdapterProfile <PhysicalComputerNetworkAdapterProfile[]> -UseAsVMHost -VirtualHardDisk <VirtualHardDisk> [-AnswerFile <Script> ] [-BypassVHDConversion <Boolean]> ] [-Description <String> ] [-DiskConfiguration <String> ] [-DriverMatchingTag <List`1> ] [-FullName <String> ] [-GuiRunOnceCommands <String[]> ] [-JobVariable <String> ] [-OrganizationName <String> ] [-Owner <String> ] [-ProductKey <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-TimeZone <Int32]> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]
Detailed Description
The New-SCPhysicalComputerProfile cmdlet creates a profile that is used to deploy an operating system to a computer.
Parameters
-AnswerFile<Script>
Specifies a script object stored in the Virtual Machine Manager (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 2000 Server, or Windows Server 2003
-- Unattend.xml. Windows Vista, Windows 7, or Windows Server 2008.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-BypassVHDConversion<Boolean]>
Indicates whether a dynamic virtual hard disk (VHD) attached to a host profile is converted to a fixed type during deployment.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Description<String>
Specifies a description for the computer profile.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DiskConfiguration<String>
Specifies the disk and partition configuration for the physical computer that is to be deployed with Windows Hyper-V.
Example format: -DiskConfiguration "MBR=1:PRIMARY:QUICK:4:FALSE:OS::0:BOOTPARTITION;"
You must be sure to specify the correct cluster size. In the example above, the cluster size is 0. If you do not specify a cluster size, VMM uses the default of 512 bytes, which may be unsuitable to configure advanced format disks.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Domain<String>
Specifies a fully qualified domain name (FQDN) for an Active Directory domain.
Example format: -Domain "Domain01.Corp.Contoso.com"
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DomainJoinRunAsAccount<RunAsAccount>
Specifies a Run As account that has permission to join the specified domain.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DriverMatchingTag<List`1>
Specifies the custom tags to match with driver properties during deployment. If tags are specified, the deployment process matches the tags specified in the host profile with the tags in the drivers in order to download matching drivers and install them in the target image.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-FullName<String>
Specifies the name of the person in whose name a virtual machine is registered.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-GuiRunOnceCommands<String[]>
Specifies an array of commands to add to the [GuiRunOnce] section of an unattended answer file, such as Unattend.xml. Use single quotation marks around each string enclosed in double quotation marks.
For information about how Windows PowerShell uses quotation marks, type Get-Help about_Quoting_Rules
.
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 |
-JoinWorkgroup
Indicates that the computer joins a workgroup.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
true |
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? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-OrganizationName<String>
Specifies the name of the organization for the person in whose name a virtual machine is registered.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Owner<String>
Specifies the owner of a VMM object in the form of a valid domain user account.
Example format: -Owner "Contoso\PattiFuller"
Example format: -Owner "PattiFuller@Contoso"
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PhysicalComputerNetworkAdapterProfile<PhysicalComputerNetworkAdapterProfile[]>
Specifies a physical computer network adapter profile object or objects.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PhysicalComputerProfile<PhysicalComputerProfile>
Specifies a profile that is used to deploy an operating system to a computer.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-PROTipID<Guid]>
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit 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 |
-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
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UseAsFileServer
Marks the profile as a file server profile.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-UseAsVMHost
Marks the profile as a virtual machine host profile.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VirtualHardDisk<VirtualHardDisk>
Specifies a virtual hard disk object.
Aliases |
none |
Required? |
true |
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? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-VMPaths<String>
Specifies a set of default paths (as strings separated by the pipeline operator) on a host where virtual machine files can be stored.
Example format: -VMPaths "C:\Folder1|C:\Folder2|C:\Folder3"
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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).
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.
- PhysicalComputerProfile
Examples
Example 1: Create a physical computer profile
These commands create a new physical computer profile named ContosoHostProfile. To do this, the first command uses the Get-SCRunAsAccount to create an object reference to the Run As account CloudAdmin. This object reference is stored in a variable named $account. The second command then uses the Get-Credential cmdlet to create a Windows PowerShell credentials object for the account Contoso\ServiceAdmin. This object reference is stored in a variable named $credential. Note that you must supply the password for the ServiceAdmin account when running the Get-Credential cmdlet.
In the third command, Get-SCPhysicalComputerNetworkAdapterProfile is used to create an object reference to the physical computer network adapter profile that has the ID eede207d-d263-4212-ad32-fd29b5a1a6ce. This object reference is stored in a variable named $adapterProfile. Command 4 then creates an object reference by using Get-SCVirtualHardDisk. This object references is associated with the virtual hard disk Win2012stdGen1template_disk_1.vhdx.
After all the object references have been created the final command uses these references and New-SCPhysicalComputerProfile to create a physical computer profile named ContosoHostProfile.
PS C:\> $account = Get-SCRunaAsAccount -Name "CloudAdmin"
$credential = Get-Credential "Contoso\ServiceAdmin"
$adapterProfile = Get-SCPhysicalComputerNetworkAdapterProfile -ID "eede207d-d263-4212-ad32-fd29b5a1a6ce"
$vhd = Get-SCVirtualHardDisk -Name "Win2012stdGen1template_disk_1.vhdx"
New-SCPhysicalComputerProfile -Name "ContosoHostProfile" -Domain "contoso.com"-DomainJoinRunAsAccount $account -LocalAdministratorCredential $credential -PhysicalComputerNetworkAdapterProfile $adapterProfile -UseAsVMHost -VirtualHardDisk $vhd