Thursday, December 19, 2019

PowerShell: Delete all Windows user profiles with a single command

This command allows you to delete all previously created user profiles in Windows that are currently not active:

Get-WMIObject -class Win32_UserProfile | Where-Object {(!$_.Loaded)} | Remove-WmiObject

No comments:

Post a Comment