summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorWillem Pienaar <willem@ucom.co.za>2014-12-16 02:29:13 +0200
committerWillem Pienaar <willem@ucom.co.za>2014-12-16 02:29:13 +0200
commitac28652602805796211d9a3486e3a0d6d5e73f7e (patch)
treec0fb863f8d5a9109f601c651d52f65c5a05d63b3 /examples
parent8908f4a0efe015c303758fa736acb741cd072e47 (diff)
downloadansible-ac28652602805796211d9a3486e3a0d6d5e73f7e.tar.gz
Fixed error handling for the enabling of PS Remoting
Diffstat (limited to 'examples')
-rw-r--r--examples/scripts/ConfigureRemotingForAnsible.ps18
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
{