powershell remove local user directory code example Example: powershell delete local user PS C:\> Remove-LocalUser -Name "AdminContoso02"