Poweshell GU
Poweshell GU
if (-not ([Security.Principal.WindowsPrincipal]
[Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.Wi
ndowsBuiltInRole] "Administrator")) {
Write-Host "Run this script as Administrator." -ForegroundColor Red
exit
}
if ([string]::IsNullOrEmpty($targetDir)) {
Write-OutputBox "Target directory is empty. Please provide a target
directory."
return
}