|
|
@ -70,7 +70,7 @@ Function Write-VerboseLog
|
|
|
|
Function Write-HostLog
|
|
|
|
Function Write-HostLog
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$Message = $args[0]
|
|
|
|
$Message = $args[0]
|
|
|
|
Write-Host $Message
|
|
|
|
Write-Output $Message
|
|
|
|
Write-Log $Message
|
|
|
|
Write-Log $Message
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -192,8 +192,8 @@ $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
|
|
|
|
# Check to see if we are currently running "as Administrator"
|
|
|
|
# Check to see if we are currently running "as Administrator"
|
|
|
|
if (-Not $myWindowsPrincipal.IsInRole($adminRole))
|
|
|
|
if (-Not $myWindowsPrincipal.IsInRole($adminRole))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Write-Host "ERROR: You need elevated Administrator privileges in order to run this script."
|
|
|
|
Write-Output "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 " Start Windows PowerShell by using the Run as Administrator option."
|
|
|
|
Exit 2
|
|
|
|
Exit 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|