Windows/PowerShell Notes

Missing powershell commands

PowerShell view user certificates

PowerShell windows update on remote computer

PowerShell add admin user

net user mylocaladmin p@ssw0rd! /add /expires:never
net localgroup administrators mylocaladmin /add

PowerShell unlock user

 Set-LocalUser -name '<userid>' -PasswordNeverExpires $true

PowerShell reset user password e.g. Administrator

net user USERNAME NEWPASS

PowerShell update host file with dns entry

Add-Content -Path $env:windir\System32\drivers\etc\hosts -Value "`n127.0.0.1`tlocalhost" -Force
#

Windows/PowerShell (last edited 2022-01-26 21:34:01 by PieterSmit)