Update Windows10DebloaterGUI.ps1

This commit is contained in:
Richard Newton 2019-01-25 20:23:12 -08:00 committed by GitHub
parent 5f726f50dc
commit 770ccd0aca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,4 @@
#This will self elevate the script so with a UAC prompt since this script needs to be run as an Administrator in order to function properly.
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
$arguments = "&" + $MyInvocation.MyCommand.Definition + ""
Write-Host "You didn't run this script as an Administrator. This script will self elevate to run as an Administrator." -ForegroundColor "White"