Set-​Azure​Rm​Vmss​Os​Profile

Sets the VMSS operating system profile properties.

Syntax

Set-AzureRmVmssOsProfile
   [-VirtualMachineScaleSet] <VirtualMachineScaleSet>
   [[-ComputerNamePrefix] <String>]
   [[-LinuxConfigurationDisablePasswordAuthentication] <Boolean>]
   [[-PublicKey] <SshPublicKey[]>]
   [[-Secret] <VaultSecretGroup[]>]
   [[-AdminUsername] <String>]
   [[-AdminPassword] <String>]
   [[-CustomData] <String>]
   [[-WindowsConfigurationProvisionVMAgent] <Boolean>]
   [[-WindowsConfigurationEnableAutomaticUpdate] <Boolean>]
   [[-TimeZone] <String>]
   [[-AdditionalUnattendContent] <AdditionalUnattendContent[]>]
   [[-Listener] <WinRMListener[]>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureRmVmssOsProfile cmdlet sets the Virtual Machine Scale Set operating system profile properties.

Examples

Example 1: Set the operating system profile properties for a VMSS

PS C:\> Set-AzureRmVmssOSProfile -VirtualMachineScaleSet "ContosoVMSS" -ComputerNamePrefix "Test" -AdminUsername $AdminUsername -AdminPassword $AdminPassword

This command sets operating system profile properties for the virtual machines that belong to the VMSS named ContosoVMSS. The command sets the computer name prefix for all the virtual machine instances in the VMSS to Test and supplies the administrator username and password.

Required Parameters

-VirtualMachineScaleSet

Specifies the VMSS object. You can use the New-AzureRmVmssConfig cmdlet to create the object.

Type:VirtualMachineScaleSet
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-AdditionalUnattendContent

Specifies an unattended content object. You can use the Add-AzureRmVMAdditionalUnattendContent to create the object.

Type:AdditionalUnattendContent[]
Position:8
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AdminPassword

Specifies the administrator password to use for all the virtual machine instances in the VMSS.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-AdminUsername

Specifies the administrator account name to use for all the virtual machine instances in the VMSS.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ComputerNamePrefix

Specifies the computer name prefix for all the virtual machine instances in the VMSS. Computer names must be 1 to 15 characters long.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-CustomData

Specifies a base-64 encoded string of custom data. This is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-LinuxConfigurationDisablePasswordAuthentication

Indicates that this cmdlet disables password authentication.

Type:Boolean
Position:10
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Listener

Specifies the Windows Remote Management (WinRM) listeners. This enables remote Windows PowerShell. You can use the Add-AzureRmVmssWinRMListener cmdlet to create the listener.

Type:WinRMListener[]
Position:9
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PublicKey

Specifies the Secure Shell (SSH) public key object. You can use the Add-AzureRmVMSshPublicKey cmdlet to create the object.

Type:SshPublicKey[]
Position:11
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Secret

Specifies the secrets object which contains the certificate references to place on the virtual machine. You can use the Add-AzureRmVmssSecret cmdlet to create the secrets object.

Type:VaultSecretGroup[]
Position:12
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-TimeZone

Specifies the time zone for the virtual machine.

Type:String
Position:7
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WindowsConfigurationEnableAutomaticUpdate

Indicates whether the virtual machines in the VMSS are enabled for automatic updates.

Type:Boolean
Position:6
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WindowsConfigurationProvisionVMAgent

Indicates whether virtual machine agent should be provisioned on the virtual machines in the VMSS.

Type:Boolean
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

This cmdlet does not generate any output.