![]() ![]() You can set to automatically delete Domain user profiles that are older than X time. I'm trying to create a Powershell script that removes from a Windows computer a user's profile, a user's folder in 'C:\Users', and a user's registry key in 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\ProfileList' - All for any user whose profile is dormant beyond 90 days. 3 answers Sort by: Most helpful Limitless Technology 38,016 Nov 4, 2021, 12:09 PM Hello Shane King In my case I am using GPO. If (!($ExcludedUsers -like $littleobj.LocalPath. Powershell script completely removing user profile/folder/reg key. At this point I've been looking at the script for too long. Windows 10 Go to Settings > Accounts > Family & other users Select the account you want to delete and click on Remove button It will open a. I've used the same deletion methods in other scripts and they work perfectly fine so I'm not exactly sure what is going on. I get the variables I want but the deletion parts are not working. ![]() I am trying to clean up C:\Users of any profile not used in the past 7 days, excluding a few accounts, and then doing the same thing in the registry just in case anything was leftover. Research Triangle Powershell User Group remote-capable To open the Windows PowerShell with an elevated right, click on the Start button/menu of Windows 10 and type PowerShell.Philadelphia PowerShell User Group remote-capable.Madison Power Users Group remote-capable.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit. ![]() I found the current script which I got to work for me, but Id like to optimize it so I can input or import a list of computers where I want him to remove all the user profiles from.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |