Purpose: Delete a local user account on a Windows computer.
Run the following Remove-LocalUser
command in a PowerShell window using an account with local administrator privileges:
Remove-LocalUser -Name "<local-user>"
Notes:<local-user>
: Local user account to delete
References:
Remove-LocalUser (Microsoft.PowerShell.LocalAccounts) – PowerShell | Microsoft Docs
Related:
PowerShell: Add User Account To Local Group – CodeCentral.com