Delete old windows6/29/2023 ![]() You can run this PowerShell script via a GPO at shutdown or with a PowerShell script in Task Scheduler. ![]() Type disk cleanup in the Windows search box, then select Disk Cleanup in the search results. Delete old Windows files via Disk Cleanup. Write-host $LocalProfile.LocalPath, "profile deleted” -ForegroundColor Magenta Open the Windows start menu from the bottom left and select your username. Get-CimInstance -Class Win32_UserProfile | Where-Object įoreach ($LocalProfile in $LocalProfiles) You can also delete a specific user’s profile using PowerShell: In the context menu that opens, click on. Go to File Explorer > This computer and right-click on the C drive. Delete this registry key to complete the correct removal of the profile. How to delete Windows.old via File Explorer.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).For each user logged in locally (this login method must be allowed for the user by the Allow log on locally GPO option), a separate sub-key is created with the user’s SID as the name. ![]()
0 Comments
Leave a Reply. |