create azure devops windows self hosted agent remotely create azure devops windows self hosted agent remotely powershell powershell

create azure devops windows self hosted agent remotely


I have found out a way using Run-Command. This is another helpful option to run the PS scripts remotely on a Virtual machine. In addition, this executes the script with elevated permissions which is really helpful in many scenarios.

Source: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/run-command#powershell

This can be performed using via Portal, Powershell and CLI as well.