Advertisement
Guest User

Remove local user remotely (legacy command included)

a guest
Aug 20th, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Powershell 5.x
  2. Invoke-Command -ComputerName Computer1, Computer2, ComputerX { Remove-LocalUser -Confirm:$false localUserName }
  3.  
  4. # Use net use when PS 5.x isn't available
  5. Invoke-Command -ComputerName Computer1, Computer2, ComputerX { net user localUserName /delete }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement