Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-AzureProvisioningConfig

Add-AzureProvisioningConfig

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Adds the provisioning configuration to a Microsoft Azure virtual machine.

Syntax

Add-AzureProvisioningConfig [-VM] [-DisableGuestAgent] [-CustomDataFile] [-Windows] [-AdminUsername] [-Password] [-ResetPasswordOnFirstLogon] [-DisableAutomaticUpdates] [-NoRDPEndpoint] [-TimeZone] [-Certificates] [-EnableWinRMHttp] [-DisableWinRMHttps] [-WinRMCertificate] [-X509Certificates] [-NoExportPrivateKey] [-NoWinRMEndpoint] [<CommonParameters>]

Add-AzureProvisioningConfig [-VM] [-DisableGuestAgent] [-Linux] [-LinuxUser] [-DisableSSH] [-NoSSHEndpoint] [-NoSSHPassword] [-SSHPublicKeys] [-SSHKeyPairs] [-CustomDataFile] [-Password] [<CommonParameters>]

Add-AzureProvisioningConfig [-VM] [-DisableGuestAgent] [-CustomDataFile] [-AdminUsername] [-WindowsDomain] [-Password] [-ResetPasswordOnFirstLogon] [-DisableAutomaticUpdates] [-NoRDPEndpoint] [-TimeZone] [-Certificates] [-JoinDomain] [-Domain] [-DomainUserName] [-DomainPassword] [-MachineObjectOU] [-EnableWinRMHttp] [-DisableWinRMHttps] [-WinRMCertificate] [-X509Certificates] [-NoExportPrivateKey] [-NoWinRMEndpoint] [<CommonParameters>]

Detailed Description

The Add-AzureProvisioningConfig cmdlet adds configuration information to a virtual machine configuration used to create a new Virtual Machine. Different provisioning configurations are supported including standalone Windows servers, Windows servers joined to an Active Directory domain, and Linux-based servers. When creating an Active Directory domain joined server, the provisioning configuration must specify the fully qualified domain name of the Active Directory domain, as well as the domain credentials of a user with permission to join the machine to the domain.

Parameters

-VM <IPersistentVM>

Specifies the virtual machine object.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-DisableGuestAgent <SwitchParameter>

To disable IaaS provision guest agent.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CustomDataFile <String>

This parameter takes a file name as an argument. PowerShell will then base64 encode the contents of the file and send it along with the provisioning configuration information. The file must be less than 64KB or the Azure API will not accept the request. On Windows this data ends up in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file. On Linux, this data is passed to the VM via the ovf-env.xml file, which is copied to the /var/lib/waagent directory during provisioning. The agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Windows <SwitchParameter>

Specify to create a standalone Windows provisioning configuration.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-AdminUsername <String>

Specifies the Administrator account to create.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Password <String>

Specifies the password of the administrator account for the role.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ResetPasswordOnFirstLogon <SwitchParameter>

If specified, forces the user to change their password on first logon.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DisableAutomaticUpdates <SwitchParameter>

If specified, the configuration will have automatic updates disabled.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NoRDPEndpoint <SwitchParameter>

If specified, create the virtual machine without a remote desktop endpoint.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-TimeZone <String>

Specifies the Microsoft Time Zone value to use to set the time zone for the virtual machine. Examples are: "Pacific Standard Time" and "Canada Central Standard Time".

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Certificates <CertificateSettingList>

Specifies a set of certificates to install in the virtual machine.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-EnableWinRMHttp <SwitchParameter>

Enables WinRM over http.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DisableWinRMHttps <SwitchParameter>

Disables WinRM on https which is added by default.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-WinRMCertificate <X509Certificate2>

Certificate that will be associated with WinRM endpoint.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-X509Certificates <X509Certificate2[]>

X509 certificates that will be deployed to hosted service.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NoExportPrivateKey <SwitchParameter>

Prevents the private key from being uploaded

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NoWinRMEndpoint <SwitchParameter>

Prevents the WinRM endpoint from being added

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Linux <SwitchParameter>

Specify to create a Linux provisioning configuration.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-LinuxUser <String>

Specifies the Linux administrative account name to create.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DisableSSH <SwitchParameter>

If specified, the virtual machine is created with SSH disabled.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NoSSHEndpoint <SwitchParameter>

If specified, create the virtual machine without an SSH endpoint.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NoSSHPassword <SwitchParameter>

Not Specified

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-SSHPublicKeys <LinuxProvisioningConfigurationSet+SSHPublicKeyList>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-SSHKeyPairs <LinuxProvisioningConfigurationSet+SSHKeyPairList>

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-WindowsDomain <SwitchParameter>

Specify to create a provisioning configuration for a Windows server joined to an Active Directory domain.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-JoinDomain <String>

Specifies the fully qualified domain name (FQDN) of the Windows domain to join.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Domain <String>

Specifies the name of the domain of the account with permission to add the computer to a domain.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DomainUserName <String>

Specifies the name of the user account with permission to add the computer to a domain.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-DomainPassword <String>

Specifies the password of the user account with permission to add the computer to a domain.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-MachineObjectOU <String>

Specifies the fully qualified name of the organizational unit (OU) in which the computer account is created.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-PipelineVariable <string>

Not Specified

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -Windows -Pass word $Password -AdminUsername PsTestAdmin `
| New-AzureVM -ServiceName $svcName

-------------------------- EXAMPLE 2 --------------------------

Description

PS C:\> New-AzureVMConfig -Name "MyDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -WindowsDomain -Password $Password -AdminUsername PsTestAdmin -ResetPasswordOnFirstLogon -JoinDomain "contoso.com" -Domain "contoso" -DomainUserName "domainadminuser" -DomainPassword "domainPassword" -MachineObjectOU 'OU=AzureVMs,DC=contoso,DC=com'
| New-AzureVM -ServiceName $svcName

-------------------------- EXAMPLE 3 --------------------------

Description

PS C:\> New-AzureVMConfig -Name "MyLinuxVM" -InstanceSize Small -ImageName $LnxImg `
| Add-AzureProvisioningConfig -Linux -LinuxUser $linuxUser -Password $Password `
| New-AzureVM -ServiceName $svcName

-------------------------- EXAMPLE 4 --------------------------

Description

PS C:\> $certs = Get-ChildItem  Cert:\CurrentUser\My
New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -WinRMCertificate $certs[0] -X509Certificates $certs[1], $certs[2] `
| New-AzureVM -ServiceName $svcName -WaitForBoot

-------------------------- EXAMPLE 5 --------------------------

Description

PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -EnableWinRMHttp `
| New-AzureVM -ServiceName $svcName -WaitForBoot

-------------------------- EXAMPLE 6 --------------------------

Description

PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -DisableWinRMHttps `
| New-AzureVM -ServiceName $svcName -WaitForBoot

-------------------------- EXAMPLE 7 --------------------------

Description

PS C:\> $certs = Get-ChildItem  Cert:\CurrentUser\My
New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -Windows -Password $Password -AdminUsername PsTestAdmin -X509Certificates $certs[0], $certs[1] -NoExportPrivateKey `
| New-AzureVM -ServiceName $svcName -WaitForBoot

-------------------------- EXAMPLE 8 --------------------------

Description

PS C:\> New-AzureVMConfig -Name "MyNonDomainVM" -InstanceSize Small -ImageName $img `
| Add-AzureProvisioningConfig -Windows -Pass word $Password -AdminUsername PsTestAdmin `
| New-AzureVM -ServiceName $svcName -DisableGuestAgent

Unknown