Skip to content

Instantly share code, notes, and snippets.

View BMFCloud's full-sized avatar

Brandon Fortunato BMFCloud

  • BMF Cloud Strategy
View GitHub Profile
@ducas
ducas / Create-Administrator.ps1
Last active February 4, 2026 11:52
Create a local administrator account using PowerShell
$Username = "su"
$Password = "password"
$group = "Administrators"
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }
if ($existing -eq $null) {