Hello all thanks in advance for your help.
The following script functionality works to authenticate & connect to hyper v hosts & query directly vm details, however this is
only when PS is running in console,
not IDE, nor can I directly run the .PS1 script.
A recent MVP mentioned that this is a limitation -
http://social.technet.microsoft.com...8645e5c035 See code below:
$VMHost = "servername" Enter-PSSession $VMHost -credential ( Get-Credential )
$Env = "environmentname"
CD D:\PS\Scripts . .\hyperv.ps1 -quiet
Get-VM $Env*
Exit-PSSession
I'd like to have it so I can just run the script located on the hyper v host ( PS\Scripts . .\hyperv.ps1) remotely through PSSession w/ out needing to open a console, any suggestions?