external help file | Module Name | online version | schema | content_git_url | original_content_git_url |
---|---|---|---|---|---|
Az.ConnectedMachine-help.xml |
Az.ConnectedMachine |
2.0.0 |
The operation to create or update the extension.
Set-AzConnectedMachineExtension -MachineName <String> -Name <String> -ResourceGroupName <String>
[-SubscriptionId <String>] -Location <String> [-AutoUpgradeMinorVersion] [-EnableAutomaticUpgrade]
[-ExtensionType <String>] [-ForceRerun <String>] [-InstanceViewName <String>] [-InstanceViewType <String>]
[-InstanceViewTypeHandlerVersion <String>] [-ProtectedSetting <Hashtable>] [-Publisher <String>]
[-Setting <Hashtable>] [-StatusCode <String>] [-StatusDisplayStatus <String>] [-StatusLevel <String>]
[-StatusMessage <String>] [-StatusTime <DateTime>] [-Tag <Hashtable>] [-TypeHandlerVersion <String>]
[-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-WhatIf] [-Confirm]
[<CommonParameters>]
Set-AzConnectedMachineExtension -MachineName <String> -Name <String> -ResourceGroupName <String>
[-SubscriptionId <String>] -ExtensionParameter <IMachineExtension> [-DefaultProfile <PSObject>] [-AsJob]
[-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-AzConnectedMachineExtension -MachineName <String> -Name <String> -ResourceGroupName <String>
[-SubscriptionId <String>] -JsonFilePath <String> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
[-WhatIf] [-Confirm] [<CommonParameters>]
Set-AzConnectedMachineExtension -MachineName <String> -Name <String> -ResourceGroupName <String>
[-SubscriptionId <String>] -JsonString <String> [-DefaultProfile <PSObject>] [-AsJob] [-NoWait]
[-WhatIf] [-Confirm] [<CommonParameters>]
The operation to create or update the extension.
$Settings = @{ "commandToExecute" = "powershell.exe -c Get-Process" }
Set-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName win-eastus1 -Location eastus -Publisher "Microsoft.Compute" -TypeHandlerVersion 1.10 -Settings $Settings -ExtensionType CustomScriptExtension
Name Location ProvisioningState
---- -------- -----------------
custom eastus Succeeded
Sets an extension on a machine.
$otherExtension = Get-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName other
$otherExtension | Set-AzConnectedMachineExtension -Name custom -ResourceGroupName ContosoTest -MachineName important
Name Location ProvisioningState
---- -------- -----------------
custom eastus Succeeded
This sets an extension with the extension parameters provided by the object passed in via the pipeline. This is great if you want to grab the parameters of one machine and apply it to another machine.
Run the command as a job
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Describes a Machine Extension.
Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension
Parameter Sets: Update
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies the type of the extension; an example is "CustomScriptExtension".
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
How the extension handler should be forced to update even if the extension configuration has not changed.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The machine extension name.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the type of the extension; an example is "CustomScriptExtension".
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the version of the script handler.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Path of Json file supplied to the Update operation
Type: System.String
Parameter Sets: UpdateViaJsonFilePath
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Json string supplied to the Update operation
Type: System.String
Parameter Sets: UpdateViaJsonString
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The geo-location where the resource lives
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the machine where the extension should be created or updated.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the machine extension.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Run the command asynchronously
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
Type: System.Collections.Hashtable
Parameter Sets: UpdateExpanded
Aliases: ProtectedSettings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the extension handler publisher.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The name of the resource group. The name is case insensitive.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Json formatted public settings for the extension.
Type: System.Collections.Hashtable
Parameter Sets: UpdateExpanded
Aliases: Settings
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The status code.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The short localizable label for the status.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The level code.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The detailed status message, including for alerts and error messages.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The time of the status.
Type: System.DateTime
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The ID of the target subscription.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False
Resource tags.
Type: System.Collections.Hashtable
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the version of the script handler.
Type: System.String
Parameter Sets: UpdateExpanded
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.