You can run this PowerShell script via a GPO at shutdown or with a PowerShell script in Task Scheduler. Write-host $LocalProfile.LocalPath, "profile deleted” -ForegroundColor Magenta Get-CimInstance -Class Win32_UserProfile | Where-Object įoreach ($LocalProfile in $LocalProfiles) You can also delete a specific user’s profile using PowerShell: Delete this registry key to complete the correct removal of the profile.You can find the registry key corresponding to the user by its SID, or you can manually browse the contents of all subkeys until you find a key in which the ProfileImagePath value points to the directory with the user profile on disk (for example, C:\Users\j.smith).
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |