Add-AzureRmVmssAdditionalUnattendContent
Adds information to the unattended Windows Setup answer file.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Add-AzureRmVmssAdditionalUnattendContent
[-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
[[-PassName] <PassNames>]
[[-ComponentName] <ComponentNames>]
[[-SettingName] <SettingNames>]
[[-Content] <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-AzureRmVmssAdditionalUnattendContent cmdlet adds information to the unattended Windows Setup answer file.
Examples
Example 1: Add information to the unattended Windows Setup answer file
PS C:\> Add-AzureRmVmssAdditionalUnattendContent -VirtualMachineScaleSet $VMSS -ComponentName $AUCComponentName -Content $AUCContent -PassName $AUCPassName -SettingName $AUCSetting
This command adds information to the unattended Windows Setup answer file.
Parameters
-ComponentName
Specifies the name of the component to configure with the added content. The only allowable value is Microsoft-Windows-Shell-Setup.
Type: | Nullable<T>[ComponentNames] |
Accepted values: | MicrosoftWindowsShellSetup |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Content
Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassName
Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.
Type: | Nullable<T>[PassNames] |
Accepted values: | OobeSystem |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SettingName
Specifies the name of the setting to which the content applies. The acceptable values for this parameter are::
- FirstLogonCommands
- AutoLogon
Type: | Nullable<T>[SettingNames] |
Accepted values: | AutoLogon, FirstLogonCommands |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualMachineScaleSet
Specify the virtual machine Scale Set object. You can use the New-AzureRmVmssConfig cmdlet to create the object.
Type: | PSVirtualMachineScaleSet |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Nullable<T>[[Microsoft.Azure.Management.Compute.Models.PassNames, Microsoft.Azure.Management.Compute, Version=21.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
Nullable<T>[[Microsoft.Azure.Management.Compute.Models.ComponentNames, Microsoft.Azure.Management.Compute, Version=21.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
Nullable<T>[[Microsoft.Azure.Management.Compute.Models.SettingNames, Microsoft.Azure.Management.Compute, Version=21.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]