Reputation: 117
I try to run a command on about 42 servers, and the script got stuck and failed.
When I try to run Invoke-Command
on the one of the failed servers, I got:
Connecting to remote server $$$$ failed with the following error message : The WSMan service could not launch a host process to process the given request. Make sure the WSMan provider host server and proxy are properly registered.
WinRM service is up on the remote servers. I ran Enable-PSRemoting
on the remote.
WinRM settings:
MaxEnvelopeSizekb - 500 MaxTimeoutms - 60000 MaxBatchItems - 32000 TrustedSites - *
Running the script from another server fails too, randomly on other servers from the list.
Upvotes: -1
Views: 1482
Reputation: 1
Also had this issue which was resolved by fixing a corrupted/missing Default user profile
Upvotes: 0
Reputation: 117
I had solved it... The problem caused because a GPO which delete the profiles of the users so when I do ICM, the command make a profile on the remote server, and because the profile deleted, the icm failed...
I run this successfuly:
Invoke-Command -ComputerName $Ip -ScriptBlock {***} -ArgumentList $IP -Credential $cred -ThrottleLimit 100 -AsJob ***-SessionOption ( New-PSSessionOption -NoMachineProfile)***
Upvotes: 0