< Back

Set-AzureRmVmssOsProfile

Tue Jan 29, 2019 9:40 pm

NAME Set-AzureRmVmssOsProfile



SYNOPSIS

Sets the VMSS operating system profile properties.





SYNTAX

Set-AzureRmVmssOsProfile [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet> [[-ComputerNamePrefix] <String>]

[[-LinuxConfigurationDisablePasswordAuthentication] <Boolean>] [[-PublicKey] <SshPublicKey[]>] [[-Secret] <VaultSecretGroup[]>] [[-AdminUsername]

<String>] [[-AdminPassword] <String>] [[-CustomData] <String>] [[-WindowsConfigurationProvisionVMAgent] <Boolean>]

[[-WindowsConfigurationEnableAutomaticUpdate] <Boolean>] [[-TimeZone] <String>] [[-AdditionalUnattendContent] <AdditionalUnattendContent[]>]

[[-Listener] <WinRMListener[]>] [-DefaultProfile <IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-AdditionalUnattendContent <AdditionalUnattendContent[]>

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



Required? false

Position? 8

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AdminPassword <String>

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



Required? false

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AdminUsername <String>

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



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ComputerNamePrefix <String>

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



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-CustomData <String>

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.



Required? false

Position? 4

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LinuxConfigurationDisablePasswordAuthentication <Boolean>

Indicates that this cmdlet disables password authentication.



Required? false

Position? 10

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Listener <WinRMListener[]>

Specifies the Windows Remote Management (WinRM) listeners. This enables remote Windows PowerShell. You can use the

Add-AzureRmVmssWinRMListener cmdlet to create the listener.



Required? false

Position? 9

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PublicKey <SshPublicKey[]>

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



Required? false

Position? 11

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Secret <VaultSecretGroup[]>

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.



Required? false

Position? 12

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TimeZone <String>

Specifies the time zone for the virtual machine.



Required? false

Position? 7

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VirtualMachineScaleSet <PSVirtualMachineScaleSet>

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



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-WindowsConfigurationEnableAutomaticUpdate <Boolean>

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



Required? false

Position? 6

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-WindowsConfigurationProvisionVMAgent <Boolean>

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



Required? false

Position? 5

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

VirtualMachineScaleSet

Parameter 'VirtualMachineScaleSet' accepts value of type 'VirtualMachineScaleSet' from the pipeline





OUTPUTS

This cmdlet does not generate any output.







NOTES









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.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... sosprofile

Add-AzureRmVMAdditionalUnattendContent

Add-AzureRmVmssWinRMListener

Add-AzureRmVMSshPublicKey

Add-AzureRmVmssSecret

New-AzureRmVmssConfig