Closed gordonAndersen closed 6 years ago
The APIs are not remotable, but you can create a WinRM session to a remote computer and install/execute the module on that remove computer.
$session = new-possession RemoteComputerName
invoke-command -session $session { if (!(get-module -list vssetup)) { install-module vssetup -scope currentuser }; get-vssetupinstance -all -pre }
$session | remove-possession
It would be nice if one could do a Get-VSSetupInstance -ComputerName MyBuildserver. I have tried with something like Invoke-Command MyBuildserver -Scriptblock {Get-VSSetupInstance} without luck.