Created
January 1, 2015 18:42
-
-
Save mlapida/87614982f5a6e4ad205e to your computer and use it in GitHub Desktop.
Azure: Check VM Agent Health
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
# Define Parameters | |
[parameter(Mandatory=$true)] | |
[string]$sub, | |
[parameter(Mandatory=$true)] | |
[string]$vm, | |
[parameter(Mandatory=$true)] | |
[string]$service | |
) | |
Select-AzureSubscription -SubscriptionName $sub | |
#Check the communication status of the Agent | |
(Get-AzureVM -ServiceName $service -Name $vm).GuestAgentStatus | Format-List GuestAgentVersion,Status | |
#Update Agent config to allow connections | |
Get-AzureVM -ServiceName $service -Name $sub | Set-AzureVMAccessExtension | Update-AzureVM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment