Skip to content

Instantly share code, notes, and snippets.

View imorari's full-sized avatar

Iulian Morari imorari

  • Dlasco
  • Boston
  • 02:37 (UTC -12:00)
View GitHub Profile
Param(
)
$VerbosePreference = "Continue"
# Ensure the script is running with elevated privileges
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Error "This script must be run as an Administrator"
exit
}