Commit 7145da7d by Chris Church

Merge pull request #9824 from willempienaar/devel

Fixed error handling for the enabling of PS Remoting
parents 8908f4a0 ac286526
......@@ -98,13 +98,7 @@ ElseIf ((Get-Service "WinRM").Status -ne "Running")
If (!(Get-PSSessionConfiguration -Verbose:$false) -or (!(Get-ChildItem WSMan:\localhost\Listener)))
{
Write-Verbose "Enabling PS Remoting."
Try
{
Enable-PSRemoting -Force -ErrorAction SilentlyContinue
}
Catch
{
}
Enable-PSRemoting -Force -ErrorAction Stop
}
Else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment