You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/run-command-managed.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,10 @@ The *updated* managed Run Command uses the same VM agent channel to execute scri
33
33
- Passing secrets (parameters, passwords) in a secure manner
34
34
35
35
36
+
## Register for preview
37
+
38
+
You must register your subscription in order to use managed Run Command during public preview. Go to [set up preview features in Azure subscription](../../azure-resource-manager/management/preview-features.md) for registration instructions and use the feature name `RunCommandPreview`.
39
+
36
40
## Azure CLI
37
41
38
42
The following examples use [az vm run-command](/cli/azure/vm/run-command) to run shell script on an Azure Linux VM.
@@ -41,7 +45,7 @@ The following examples use [az vm run-command](/cli/azure/vm/run-command) to run
41
45
This command will deliver the script to the VM, execute it, and return the captured output.
42
46
43
47
```azurecli-interactive
44
-
az vm run-command set --name "myRunCommand" --vm-name "myVM" --resource-group "myRG" --script "echo Hello World!"
48
+
az vm run-command create --name "myRunCommand" --vm-name "myVM" --resource-group "myRG" --script "echo Hello World!"
45
49
```
46
50
47
51
### List all deployed RunCommand resources on a VM
@@ -72,7 +76,7 @@ az vm run-command delete --name "myRunCommand" --vm-name "myVM" --resource-group
72
76
This command will deliver the script to the VM, execute it, and return the captured output.
Copy file name to clipboardExpand all lines: articles/virtual-machines/windows/run-command-managed.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,10 @@ The *updated* managed Run Command uses the same VM agent channel to execute scri
33
33
- Passing secrets (parameters, passwords) in a secure manner
34
34
35
35
36
+
## Register for preview
37
+
38
+
You must register your subscription in order to use managed Run Command during public preview. Go to [set up preview features in Azure subscription](../../azure-resource-manager/management/preview-features.md) for registration instructions and use the feature name `RunCommandPreview`.
39
+
36
40
## Azure CLI
37
41
38
42
The following examples use [az vm run-command](/cli/azure/vm/run-command) to run shell script on an Azure Windows VM.
@@ -41,7 +45,7 @@ The following examples use [az vm run-command](/cli/azure/vm/run-command) to run
41
45
This command will deliver the script to the VM, execute it, and return the captured output.
42
46
43
47
```azurecli-interactive
44
-
az vm run-command set --name "myRunCommand" --vm-name "myVM" --resource-group "myRG" --script "Write-Host Hello World!"
48
+
az vm run-command create --name "myRunCommand" --vm-name "myVM" --resource-group "myRG" --script "Write-Host Hello World!"
45
49
```
46
50
47
51
### List all deployed RunCommand resources on a VM
@@ -72,7 +76,7 @@ az vm run-command delete --name "myRunCommand" --vm-name "myVM" --resource-group
72
76
This command will deliver the script to the VM, execute it, and return the captured output.
0 commit comments