diff options
| author | Willem Pienaar <willem@ucom.co.za> | 2014-12-16 02:29:13 +0200 |
|---|---|---|
| committer | Willem Pienaar <willem@ucom.co.za> | 2014-12-16 02:29:13 +0200 |
| commit | ac28652602805796211d9a3486e3a0d6d5e73f7e (patch) | |
| tree | c0fb863f8d5a9109f601c651d52f65c5a05d63b3 /examples/scripts | |
| parent | 8908f4a0efe015c303758fa736acb741cd072e47 (diff) | |
| download | ansible-ac28652602805796211d9a3486e3a0d6d5e73f7e.tar.gz | |
Fixed error handling for the enabling of PS Remoting
Diffstat (limited to 'examples/scripts')
| -rw-r--r-- | examples/scripts/ConfigureRemotingForAnsible.ps1 | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/examples/scripts/ConfigureRemotingForAnsible.ps1 b/examples/scripts/ConfigureRemotingForAnsible.ps1 index 39601d2a76..1b45ce442b 100644 --- a/examples/scripts/ConfigureRemotingForAnsible.ps1 +++ b/examples/scripts/ConfigureRemotingForAnsible.ps1 @@ -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 { |
