@@ -75,28 +75,28 @@ az vm run-command delete --name "myRunCommand" --vm-name "myVM" --resource-group
75
75
This command will deliver the script to the VM, execute it, and return the captured output.
76
76
77
77
``` powershell-interactive
78
- Set-AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM" -Name "RunCommandName" –SourceScript "Write-Host Hello World!"
78
+ Set-AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM" -RunCommandName "RunCommandName" –SourceScript "Write-Host Hello World!"
79
79
```
80
80
81
81
### List all deployed RunCommand resources on a VM
82
82
This command will return a full list of previously deployed Run Commands along with their properties.
83
83
84
84
``` powershell-interactive
85
- Get-AzVMRunCommand AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM"
85
+ Get-AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM"
86
86
```
87
87
88
88
### Get execution status and results
89
89
This command will retrieve current execution progress, including latest output, start/end time, exit code, and terminal state of the execution.
90
90
91
91
``` powershell-interactive
92
- Get-AzVMRunCommand AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM" -Name "RunCommandName" -Status
92
+ Get-AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM" -RunCommandName "RunCommandName" -Status
93
93
```
94
94
95
95
### Delete RunCommand resource from the VM
96
96
Remove the RunCommand resource previously deployed on the VM. If the script execution is still in progress, execution will be terminated.
97
97
98
98
``` powershell-interactive
99
- Remove-AzVMRunCommand AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM" -Name "RunCommandName"
99
+ Remove-AzVMRunCommand -ResourceGroupName "myRG" -VMName "myVM" -RunCommandName "RunCommandName"
100
100
```
101
101
102
102
0 commit comments