Forum Discussion

Manas Saha's avatar
Manas Saha
Brass Contributor
Aug 24, 2017

Invoke-Command is not helping me anymore..

Team ,

 

I need a solution here , I am trying to connect my VM which is running in Hyper-V and I would like to deploy some of the scripts which will run automatically inside the VM and then it will create a text file which I would like to export it to the base machine .

 

I was trying the same with Invoke-Command . I don't know the other work around .

 

Need your help to get this thing done ASAP .

 

Regards ,

Manas Saha

2 Replies

  • Anders Rødland's avatar
    Anders Rødland
    Copper Contributor

    PowerShell Direct should help you do this. It allows you to run PowerShell from the host inside the VM guests. Windows 10 and/or Server 2016 is required.

     

    https://blogs.technet.microsoft.com/virtualization/2015/05/14/powershell-direct-running-powershell-inside-a-virtual-machine-from-the-hyper-v-host/

Resources