שתף באמצעות


az connectedvmware vm extension

Note

This reference is part of the connectedvmware extension for the Azure CLI (version 2.0.67 or higher). The extension will automatically install the first time you run an az connectedvmware vm extension command. Learn more about extensions.

Manage vm extension with connectedvmware.

Commands

Name Description Type Status
az connectedvmware vm extension create

The operation to create the extension.

Extension GA
az connectedvmware vm extension delete

The operation to delete the extension.

Extension GA
az connectedvmware vm extension list

The operation to get all extensions of a non-Azure vm.

Extension GA
az connectedvmware vm extension show

The operation to get the extension.

Extension GA
az connectedvmware vm extension update

The operation to update the extension.

Extension GA

az connectedvmware vm extension create

The operation to create the extension.

az connectedvmware vm extension create --location
                                       --name
                                       --resource-group
                                       --vm-name
                                       [--auto-upgrade-minor {false, true}]
                                       [--enable-auto-upgrade {false, true}]
                                       [--force-update-tag]
                                       [--no-wait]
                                       [--protected-settings]
                                       [--publisher]
                                       [--settings]
                                       [--tags]
                                       [--type]
                                       [--type-handler-version]

Examples

Create a VM Extension

az connectedvmware vm extension create --name "CustomScriptExtension" --location "eastus2euap" --type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings "{\"commandToExecute\":\"powershell.exe -c \\\"Get-Process | Where-Object { $_.CPU -gt 10000 }\\\"\"}" --type-handler-version "1.10" --vm-name "vm name" --resource-group "myResourceGroup"

Required Parameters

--location -l

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

--name

The name of the vm extension.

--resource-group -g

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

--vm-name

The name of the vm where the extension should be created or updated.

Optional Parameters

--auto-upgrade-minor

Indicate 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.

Accepted values: false, true
--enable-auto-upgrade

Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.

Accepted values: false, true
--force-update-tag

How the extension handler should be forced to update even if the extension configuration has not changed.

--no-wait

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

Default value: False
--protected-settings

The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. Expected value: json-string/json-file/@json-file.

--publisher

The name of the extension handler publisher.

--settings

Json formatted public settings for the extension. Expected value: json-string/json-file/@json-file.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--type

Specify the type of the extension; an example is "CustomScriptExtension".

--type-handler-version

Specifies the version of the script handler.

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 connectedvmware vm extension delete

The operation to delete the extension.

az connectedvmware vm extension delete [--ids]
                                       [--name]
                                       [--no-wait]
                                       [--resource-group]
                                       [--subscription]
                                       [--vm-name]
                                       [--yes]

Examples

Delete a VM Extension

az connectedvmware vm extension delete --name "vm extension name" --vm-name "vm name" --resource-group "myResourceGroup"

Optional Parameters

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

--name

The name of the vm extension.

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

--vm-name

The name of the vm where the extension should be deleted.

--yes -y

Do not prompt for confirmation.

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 connectedvmware vm extension list

The operation to get all extensions of a non-Azure vm.

az connectedvmware vm extension list --resource-group
                                     --vm-name
                                     [--expand]

Examples

Get all VM Extensions

az connectedvmware vm extension list --vm-name "vm name" --resource-group "myResourceGroup"

Required Parameters

--resource-group -g

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

--vm-name

The name of the vm containing the extension.

Optional Parameters

--expand

The expand expression to apply on the operation.

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 connectedvmware vm extension show

The operation to get the extension.

az connectedvmware vm extension show [--ids]
                                     [--name]
                                     [--resource-group]
                                     [--subscription]
                                     [--vm-name]

Examples

Get VM Extension

az connectedvmware vm extension show --name "CustomScriptExtension" --vm-name "vm name" --resource-group "myResourceGroup"

Optional Parameters

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

--name

The name of the vm extension.

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

--vm-name

The name of the vm containing the extension.

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 connectedvmware vm extension update

The operation to update the extension.

az connectedvmware vm extension update --name
                                       --resource-group
                                       --vm-name
                                       [--auto-upgrade-minor {false, true}]
                                       [--enable-auto-upgrade {false, true}]
                                       [--force-update-tag]
                                       [--no-wait]
                                       [--protected-settings]
                                       [--publisher]
                                       [--settings]
                                       [--tags]
                                       [--type]
                                       [--type-handler-version]

Examples

Update a VM Extension

az connectedvmware vm extension update --name "CustomScriptExtension" --type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings "{\"commandToExecute\":\"powershell.exe -c \\\"Get-Process | Where-Object { $_.CPU -lt 100 }\\\"\"}" --type-handler-version "1.10" --vm-name "vm name" --resource-group "myResourceGroup"

Required Parameters

--name

The name of the vm extension.

--resource-group -g

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

--vm-name

The name of the vm where the extension should be created or updated.

Optional Parameters

--auto-upgrade-minor

Indicate 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.

Accepted values: false, true
--enable-auto-upgrade

Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.

Accepted values: false, true
--force-update-tag

How the extension handler should be forced to update even if the extension configuration has not changed.

--no-wait

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

Default value: False
--protected-settings

The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. Expected value: json-string/json-file/@json-file.

--publisher

The name of the extension handler publisher.

--settings

Json formatted public settings for the extension. Expected value: json-string/json-file/@json-file.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--type

Specify the type of the extension; an example is "CustomScriptExtension".

--type-handler-version

Specifies the version of the script handler.

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.