Skip to content

Commit 45bb4dc

Browse files
Updated document to include PS script to show VM agent status for Linux VMs.
The following script can be used to return a concise list of VM names (running Linux OS) and the state of the VM Agent: ```powershell $vms = Get-AzVM foreach ($vm in $vms) { $agent = $vm | Select -ExpandProperty OSProfile | Select -ExpandProperty Linuxconfiguration | Select ProvisionVMAgent Write-Host $vm.Name $agent.ProvisionVMAgent } ```
1 parent a28744c commit 45bb4dc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

articles/virtual-machines/extensions/agent-windows.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ OSProfile :
8989
EnableAutomaticUpdates : True
9090
```
9191

92-
The following script can be used to return a concise list of VM names and the state of the VM Agent:
92+
The following script can be used to return a concise list of VM names (running Windows OS) and the state of the VM Agent:
9393

9494
```powershell
9595
$vms = Get-AzVM
@@ -100,6 +100,17 @@ foreach ($vm in $vms) {
100100
}
101101
```
102102

103+
The following script can be used to return a concise list of VM names (running Linux OS) and the state of the VM Agent:
104+
105+
```powershell
106+
$vms = Get-AzVM
107+
108+
foreach ($vm in $vms) {
109+
$agent = $vm | Select -ExpandProperty OSProfile | Select -ExpandProperty Linuxconfiguration | Select ProvisionVMAgent
110+
Write-Host $vm.Name $agent.ProvisionVMAgent
111+
}
112+
```
113+
103114
### Manual Detection
104115

105116
When logged in to a Windows VM, Task Manager can be used to examine running processes. To check for the Azure VM Agent, open Task Manager, click the *Details* tab, and look for a process name **WindowsAzureGuestAgent.exe**. The presence of this process indicates that the VM agent is installed.

0 commit comments

Comments
 (0)