diff options
author | Matt Davis <mrd@redhat.com> | 2017-12-21 07:40:55 +0100 |
---|---|---|
committer | Matt Davis <mrd@redhat.com> | 2017-12-21 07:51:16 +0100 |
commit | 853fa8223a41f07af98de34c9c1d71f9312b2204 (patch) | |
tree | 69b83d90c059ce06e19a05d1f0e1bd81e0834e71 /examples | |
parent | influxdb: default hostname to localhost (#34117) (diff) | |
download | ansible-853fa8223a41f07af98de34c9c1d71f9312b2204.tar.xz ansible-853fa8223a41f07af98de34c9c1d71f9312b2204.zip |
avoid use of Write-Host in config script
Diffstat (limited to 'examples')
-rw-r--r-- | examples/scripts/ConfigureRemotingForAnsible.ps1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/scripts/ConfigureRemotingForAnsible.ps1 b/examples/scripts/ConfigureRemotingForAnsible.ps1 index 4c3e52b5d4..29dc888fb6 100644 --- a/examples/scripts/ConfigureRemotingForAnsible.ps1 +++ b/examples/scripts/ConfigureRemotingForAnsible.ps1 @@ -74,7 +74,7 @@ Function Write-VerboseLog Function Write-HostLog { $Message = $args[0] - Write-Host $Message + Write-Output $Message Write-Log $Message } @@ -196,8 +196,8 @@ $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator # Check to see if we are currently running "as Administrator" if (-Not $myWindowsPrincipal.IsInRole($adminRole)) { - Write-Host "ERROR: You need elevated Administrator privileges in order to run this script." - Write-Host " Start Windows PowerShell by using the Run as Administrator option." + Write-Output "ERROR: You need elevated Administrator privileges in order to run this script." + Write-Output " Start Windows PowerShell by using the Run as Administrator option." Exit 2 } |