Edit

Share via


Add-AzVmssAdditionalUnattendContent

Adds information to the unattended Windows Setup answer file.

Syntax

Default (Default)

Add-AzVmssAdditionalUnattendContent
    [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
    [[-PassName] <PassNames>]
    [[-ComponentName] <ComponentNames>]
    [[-SettingName] <SettingNames>]
    [[-Content] <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Add-AzVmssAdditionalUnattendContent cmdlet adds information to the unattended Windows Setup answer file.

Examples

Example 1: Add information to the unattended Windows Setup answer file

Add-AzVmssAdditionalUnattendContent -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.

Parameter properties

Type:

Nullable<T>[ComponentNames]

Default value:None
Accepted values:MicrosoftWindowsShellSetup
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Content

Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:4
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassName

Specifies the name of the pass that the content applies to. The only allowable value is oobeSystem.

Parameter properties

Type:

Nullable<T>[PassNames]

Default value:None
Accepted values:OobeSystem
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SettingName

Specifies the name of the setting to which the content applies. The acceptable values for this parameter are::

  • FirstLogonCommands
  • AutoLogon

Parameter properties

Type:

Nullable<T>[SettingNames]

Default value:None
Accepted values:AutoLogon, FirstLogonCommands
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-VirtualMachineScaleSet

Specify the virtual machine Scale Set object. You can use the New-AzVmssConfig cmdlet to create the object.

Parameter properties

Type:PSVirtualMachineScaleSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

PSVirtualMachineScaleSet

Nullable<T>

Nullable<T>

Nullable<T>

String

Outputs

PSVirtualMachineScaleSet