Share via


az guestconfig guest-configuration-hcrp-assignment

Note

This reference is part of the guestconfig extension for the Azure CLI (version 2.3.1 or higher). The extension will automatically install the first time you run an az guestconfig guest-configuration-hcrp-assignment command. Learn more about extensions.

This command group is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Guestconfig guest-configuration-hcrp-assignment.

Commands

Name Description Type Status
az guestconfig guest-configuration-hcrp-assignment create

Creates an association between a ARC machine and guest configuration.

Extension Experimental
az guestconfig guest-configuration-hcrp-assignment delete

Delete a guest configuration assignment.

Extension Experimental
az guestconfig guest-configuration-hcrp-assignment list

List all guest configuration assignments for an ARC machine.

Extension Experimental
az guestconfig guest-configuration-hcrp-assignment show

Get information about a guest configuration assignment.

Extension Experimental
az guestconfig guest-configuration-hcrp-assignment update

Creates an association between a ARC machine and guest configuration.

Extension Experimental
az guestconfig guest-configuration-hcrp-assignment wait

Place the CLI in a waiting state until a condition of the guestconfig guest-configuration-hcrp-assignment is met.

Extension Experimental

az guestconfig guest-configuration-hcrp-assignment create

Experimental

Command group 'guestconfig guest-configuration-hcrp-assignment' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Creates an association between a ARC machine and guest configuration.

az guestconfig guest-configuration-hcrp-assignment create --guest-configuration-assignment-name
                                                          --machine-name
                                                          --resource-group
                                                          [--context]
                                                          [--guest-configuration-configuration-parameter]
                                                          [--guest-configuration-configuration-setting]
                                                          [--guest-configuration-name]
                                                          [--guest-configuration-version]
                                                          [--latest-assignment-report-assignment]
                                                          [--location]
                                                          [--name]
                                                          [--no-wait]

Examples

Create or update guest configuration assignment

az guestconfig guest-configuration-hcrp-assignment create --guest-configuration-assignment-name "WhitelistedApplication" --machine-name "myMachineName" --guest-configuration-name "WhitelistedApplication" --location "westcentralus" --context "Azure policy" --guest-configuration-name "WhitelistedApplication" --guest-configuration-configuration-parameter name="[InstalledApplication]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-setting action-after-reboot="ContinueConfiguration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=15 reboot-if-needed="False" --guest-configuration-version "1.*" --resource-group "myResourceGroupName"

Required Parameters

--guest-configuration-assignment-name

Name of the guest configuration assignment.

--machine-name

The name of the ARC machine.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--context

The source which initiated the guest configuration assignment. Ex: Azure Policy.

--guest-configuration-configuration-parameter

The configuration parameters for the guest configuration.

Usage: --guest-configuration-configuration-parameter name=XX value=XX

name: Name of the configuration parameter. value: Value of the configuration parameter.

Multiple actions can be specified by using more than one --guest-configuration-configuration-parameter argument.

--guest-configuration-configuration-setting

The configuration setting for the guest configuration.

Usage: --guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-after-reboot=XX refresh-frequency-mins=XX reboot-if-needed=XX configuration-mode-frequency-mins=XX

configuration-mode: Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. allow-module-overwrite: If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false action-after-reboot: Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration refresh-frequency-mins: The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30. reboot-if-needed: Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the xPendingReboot module. configuration-mode-frequency-mins: How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.

--guest-configuration-name

Name of the guest configuration.

--guest-configuration-version

Version of the guest configuration.

--latest-assignment-report-assignment

Configuration details of the guest configuration assignment. Expected value: json-string/@json-file.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--name

Name of the guest configuration assignment.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az guestconfig guest-configuration-hcrp-assignment delete

Experimental

Command group 'guestconfig guest-configuration-hcrp-assignment' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a guest configuration assignment.

az guestconfig guest-configuration-hcrp-assignment delete [--guest-configuration-assignment-name]
                                                          [--ids]
                                                          [--machine-name]
                                                          [--no-wait]
                                                          [--resource-group]
                                                          [--subscription]

Examples

Delete an guest configuration assignment

az guestconfig guest-configuration-hcrp-assignment delete --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"

Optional Parameters

--guest-configuration-assignment-name

Name of the guest configuration assignment.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--machine-name

The name of the ARC machine.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az guestconfig guest-configuration-hcrp-assignment list

Experimental

Command group 'guestconfig guest-configuration-hcrp-assignment' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all guest configuration assignments for an ARC machine.

az guestconfig guest-configuration-hcrp-assignment list --machine-name
                                                        --resource-group

Examples

List all guest configuration assignments for a virtual machine

az guestconfig guest-configuration-hcrp-assignment list --machine-name "myMachineName" --resource-group "myResourceGroupName"

Required Parameters

--machine-name

The name of the ARC machine.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az guestconfig guest-configuration-hcrp-assignment show

Experimental

Command group 'guestconfig guest-configuration-hcrp-assignment' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get information about a guest configuration assignment.

az guestconfig guest-configuration-hcrp-assignment show [--guest-configuration-assignment-name]
                                                        [--ids]
                                                        [--machine-name]
                                                        [--resource-group]
                                                        [--subscription]

Examples

Get a guest configuration assignment

az guestconfig guest-configuration-hcrp-assignment show --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName"

Optional Parameters

--guest-configuration-assignment-name

The guest configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--machine-name

The name of the ARC machine.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az guestconfig guest-configuration-hcrp-assignment update

Experimental

Command group 'guestconfig guest-configuration-hcrp-assignment' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Creates an association between a ARC machine and guest configuration.

az guestconfig guest-configuration-hcrp-assignment update [--context]
                                                          [--guest-configuration-assignment-name]
                                                          [--guest-configuration-configuration-parameter]
                                                          [--guest-configuration-configuration-setting]
                                                          [--guest-configuration-name]
                                                          [--guest-configuration-version]
                                                          [--ids]
                                                          [--latest-assignment-report-assignment]
                                                          [--location]
                                                          [--machine-name]
                                                          [--name]
                                                          [--no-wait]
                                                          [--resource-group]
                                                          [--subscription]

Examples

Create or update guest configuration assignment

az guestconfig guest-configuration-hcrp-assignment update --guest-configuration-assignment-name "WhitelistedApplication" --machine-name "myMachineName" --guest-configuration-name "WhitelistedApplication" --location "westcentralus" --context "Azure policy" --guest-configuration-name "WhitelistedApplication" --guest-configuration-configuration-parameter name="[InstalledApplication]bwhitelistedapp;Name" value="NotePad,sql" --guest-configuration-configuration-setting action-after-reboot="ContinueConfiguration" configuration-mode="MonitorOnly" configuration-mode-frequency-mins=15 reboot-if-needed="False" --guest-configuration-version "1.*" --resource-group "myResourceGroupName"

Optional Parameters

--context

The source which initiated the guest configuration assignment. Ex: Azure Policy.

--guest-configuration-assignment-name

Name of the guest configuration assignment.

--guest-configuration-configuration-parameter

The configuration parameters for the guest configuration.

Usage: --guest-configuration-configuration-parameter name=XX value=XX

name: Name of the configuration parameter. value: Value of the configuration parameter.

Multiple actions can be specified by using more than one --guest-configuration-configuration-parameter argument.

--guest-configuration-configuration-setting

The configuration setting for the guest configuration.

Usage: --guest-configuration-configuration-setting configuration-mode=XX allow-module-overwrite=XX action-after-reboot=XX refresh-frequency-mins=XX reboot-if-needed=XX configuration-mode-frequency-mins=XX

configuration-mode: Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. allow-module-overwrite: If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false action-after-reboot: Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration refresh-frequency-mins: The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30. reboot-if-needed: Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the xPendingReboot module. configuration-mode-frequency-mins: How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15.

--guest-configuration-name

Name of the guest configuration.

--guest-configuration-version

Version of the guest configuration.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--latest-assignment-report-assignment

Configuration details of the guest configuration assignment. Expected value: json-string/@json-file.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--machine-name

The name of the ARC machine.

--name

Name of the guest configuration assignment.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az guestconfig guest-configuration-hcrp-assignment wait

Experimental

Command group 'guestconfig guest-configuration-hcrp-assignment' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Place the CLI in a waiting state until a condition of the guestconfig guest-configuration-hcrp-assignment is met.

az guestconfig guest-configuration-hcrp-assignment wait [--created]
                                                        [--custom]
                                                        [--deleted]
                                                        [--exists]
                                                        [--guest-configuration-assignment-name]
                                                        [--ids]
                                                        [--interval]
                                                        [--machine-name]
                                                        [--resource-group]
                                                        [--subscription]
                                                        [--timeout]
                                                        [--updated]

Examples

Pause executing next line of CLI script until the guestconfig guest-configuration-hcrp-assignment is successfully created.

az guestconfig guest-configuration-hcrp-assignment wait --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName" --created

Pause executing next line of CLI script until the guestconfig guest-configuration-hcrp-assignment is successfully deleted.

az guestconfig guest-configuration-hcrp-assignment wait --guest-configuration-assignment-name "SecureProtocol" --machine-name "myMachineName" --resource-group "myResourceGroupName" --deleted

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

default value: False
--exists

Wait until the resource exists.

default value: False
--guest-configuration-assignment-name

The guest configuration assignment name.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

default value: 30
--machine-name

The name of the ARC machine.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.