Automation

 View Only
  • 1.  PowerCLI error while remoting

    Posted Apr 09, 2013 09:39 PM

    I recently had some major issues remoting using PowerCLI.  I did find a workaround, but wanted to bounce this off everyone because I don't know why the workaround works.

    When I remote into a machine, add the VMWAre.vimautomation.core snapin and run certain commands, the remote session dies suddenly on me.

    Here is how I get the error to occur:

    1)  Make sure the  memory celiing on remote sessions is lifted on the remote server (server1):   Set-Item WSMAN:\localhost\Shell\MaxMemoryPerShellMB -Value 0

    2)  Enter-pssession server1

    3)  (in the remote session) Add-PSSnapin vmware.vimautomation.core

    4)  Connect-Viserver myvcserver  (I get prompted for credentials here, which I enter)

    5)  Get-VMHost myhostname | FL *

    Step 5 never returns results, my remote session closes and I get this error:

    Processing data from remote server server1 failed with the following error message: The WSMan provider host process did not return a proper response.  A provider in the host process may have behaved improperly. For more information, see the about_Remote_Troubleshooting Help topic.

    My Workaround is to install powershell 3.0 on server1.  If I install WM3.0 and run the same exact commands, it works like a charm.

    My PowerCli version is:

    VMware vSphere PowerCLI 5.1 Release 1 build 793510

    I don't see any mention of Powershell 3.0 being *required* to remote with PowerCLI.  Does anybody else see this behavior and does anybody know why this happens?

    Thanks!



  • 2.  RE: PowerCLI error while remoting

    Posted May 16, 2014 09:53 PM

    Hi,

    You will have your answer here: Freeze when running PowerCLI cmdlets via invoke-command

    Best regards