Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, June 29, 2018 8:41 AM
Hi,
I want to run powershell command via azure portal (vm agent). Command is: Get-Service
I want from powershell to show me services that are running on VM because my recovery vault always end with agent error in this VM. So I think it could be stopped agent service.
But When I run this Get-Service from azure portal show me Script execution in progress... and do nothing. I let him run for 30 minutes but no response. Why?
All replies (10)
Wednesday, July 18, 2018 8:41 AM ✅Answered
It was problem with agent. I checked properties and I find this:
Agent status
NOT READY
Agent version
Unknown
Friday, June 29, 2018 10:58 AM
We need the following information to understand/investigate this issue further:
How exactly you are running command script execution?
Are you using Invoke-AzureRmVMRunCommand or Set-AzureRmVMCustomScriptExtension?
Could you share the complete script?
Tuesday, July 3, 2018 8:43 AM
Just checking in if you have had a chance to see the previous response. We need the above requested information to understand/investigate this issue further.
Monday, July 9, 2018 8:42 AM
Hi,
see image for more information:
Tuesday, July 10, 2018 3:33 AM | 1 vote
It’s working fine as excepted.
Run command script execution took less than 2 minutes.
If this answer was helpful, click “Mark as Answer” or “Up-Vote”. To provide additional feedback on your forum experience, click here
Tuesday, July 10, 2018 11:12 AM
You are right. I tryed this command on another VM and it´s working. It must be some problem with agent on this specific VM.
Thank you for response.
Wednesday, July 11, 2018 2:49 AM
Could you restart the machine and check if you are facing same issue while executing the script?
Wednesday, July 11, 2018 8:50 AM
It was restarted but problem still occurs. I´ll check agent health on VM someday. It´s prod machine so access into it is problematic.
Thursday, July 12, 2018 4:53 AM
Do try and let us know the if there are still any additional issues I can help with.
Wednesday, July 18, 2018 8:47 AM
Thanks for updating the forum with the solution that worked for you, which might help other community members.