cs_love
cs_love

Reputation: 55

Enable-PSRemoting error: Cannot find any service with name 'winrm'

I am running a powershell script in Azure Automation runbook. While executing Enable-PSRemoting -SkipNetworkProfileCheck - Force, I get the error that there is no service named winrm.

Any idea what is the work around here?

Thanks

Upvotes: 0

Views: 529

Answers (1)

Bhargavi Annadevara
Bhargavi Annadevara

Reputation: 5512

You can use the following as workarounds:

  • Invoke-AzureRmVMRunCommand from the AzureRM module, as @Ivan Yang pointed above (refer to this thread for more information)
  • Additionally, you may also want to look into this solution that runs tasks on Azure VMs without opening ports or remoting, if that's what you're looking to accomplish.

Hope this helps.

Upvotes: 1

Related Questions