Share via


使用PowerShell创建虚拟机必须提供新参数:-AdminUserName

 

??IT ????????,????????????????(VM),??????:??????(Management Portal)???PowerShell?????????????REST API????

????PowerShell??,??????????,?????IT??????,?????????????????

???????????Windows Server?????????,????????,?????????:

clip_image001

????:“Cannot process command because of one or more missing mandatory parameter”?

??MSDN?????:New-AzureQuickVM?New-AzureVM:

https://msdn.microsoft.com/en-us/library/windowsazure/jj152839.aspx

Parameter Set: Windows

New-AzureQuickVM -ImageName <String> -Password <String> -ServiceName <String> -Windows [-AffinityGroup <String> ] [-AvailabilitySetName <String> ] [-Certificates <CertificateSettingList> ] [-DnsSettings <DnsServer[]> ] [-HostCaching <String> ] [-InstanceSize <String> ] [-Location <String> ] [-MediaLocation <String> ] [-Name <String> ] [-SubnetNames <String[]> ] [-VNetName <String> ] [ <CommonParameters>]

https://msdn.microsoft.com/en-us/library/windowsazure/jj152815.aspx

 Parameter Set: ExistingService
 New-AzureVM -ServiceName <String> -VMs <PersistentVM[]> [-DeploymentLabel <String> ] [-DeploymentName <String> ] [-DnsSettings <DnsServer[]> ] [-VNetName <String> ] [ <CommonParameters>]
  
 Parameter Set: CreateService
 New-AzureVM -ServiceName <String> -VMs <PersistentVM[]> [-AffinityGroup <String> ] [-DeploymentLabel <String> ] [-DeploymentName <String> ] [-DnsSettings <DnsServer[]> ] [-Location <String> ] [-ServiceDescription <String> ] [-ServiceLabel <String> ] [-VNetName <String> ] [ <CommonParameters>]
  

clip_image003

????????;??????????,?????????PowerShell????????????:-AdminUserName?

MSDN??????????????

????:https://github.com/WindowsAzure/azure-sdk-tools/blob/master/ChangeLog.txt

“BREAKING CHANGE: New-AzureVM and New-AzureQuickVM now require an –AdminUserName parameter when creating Windows based VMs.”

????????,???-AdminUserName???,????”Administrator”??”Admin”??????,????????,?????????????,??????,????????????

?????????,?????,???????????????