mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
avoid use of Write-Host in config script
This commit is contained in:
parent
276f7122cd
commit
853fa8223a
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue