Delete old user profiles and files automatically in windows 10 Apr 28, 2017 · I am writing a simple script that will be used to delete user profiles older than 90 days. Copy the important data back from the renamed . ” UPDATED 8/21/2024: In the legacy Outlook desktop app, part of the Microsoft 365 suite, a profile includes your accounts, data files, settings, and preferences. Feb 22, 2018 · Problem: I’m trying to figured out why a GPO used to delete user profiles older than “x” number of days no longer works as expected. This task involves accessing the system settings and following a few straightforward steps to delete the profiles you don’t need anymore. Powershell command to delete old profiles. I checked the… Sep 16, 2021 · Hey, I have a laptop to repurpose to another user that was used temporarily. Sep 9, 2024 · Managing user profiles on Windows devices can be a annoying task, especially when dealing with old or inactive profiles. Using Remove-Ciminstance avoids this. Follow these helpful and easy methods to restore the accidentally deleted profiles now. Removing other user accounts will not affect the current user account. It has to run Jun 21, 2025 · A complete Step-by-step guide on how to delete user profiles in Windows 10 or 11. Nov 8, 2023 · This script can be used to delete user accounts that are no longer active, old user profiles that have been abandoned by the user, or profiles that are flagged as dead accounts. Sometimes it's easier to prevent then to fix. Aug 18, 2022 · If you’re looking to do some general house cleaning, a great first step is knowing how to delete user profiles in Windows 10. I have around 30 workstations (windows 10) that I need to start removing old profiles from, what’s a simple and faster way to do this? Currently I have a list of users I can remove and just do it manually from system properties advanced. Our users all have roaming profile disks so when they log out of our session hosts it sometimes leaves a folder with their username with basically nothing of importance in them. What is the best way to do that or is it best to reset the pc and reinstall software? Jul 21, 2025 · Deleting a user profile in Windows 11 is straightforward. I checked Nov 3, 2021 · I don't want to delete profiles where the user still exists on the domain, the nursing staff rotate around the different wards and hence sit at different machines - I don't want to delete them if they are still users on the domain, as they have to have the App reconfigured, links to OLK re-established every time a new profile is created. If there are remaining user folders in your C drive for the deleted user accounts, you can just manually delete it. Let’s dive into the step-by-step guide to get this done. I think your Auto Pilot solution sounds like the right way to go. This is particularly useful for devices shared by multiple users, where the likelihood of stale user By utilizing the Remove Old User Profiles Worklet, administrators can automatically delete user profiles that are obsolete and safeguard important data. The methods covered include manual deletion, using PowerShell, and deleting user profiles using group policy. Dec 19, 2023 · Method 2: How to Delete User Profile in Windows 10 Manually Step 1: Open the File Explorer (This PC) and double-click on the OS C: folder to open it. This article explores how to configure this setting in Intune and best practices […] Jun 24, 2022 · Group Policy: Automatically Delete User Profiles Older Than Certain Number of Hi I enabled Computer Configuration\Administrative Templates\System\User Profiles\Delete User Profiles Older Than xxx GPO and apply to Windows 10 PCs. The Windows user profile service keeps track of when a user profile was created through the use of the registry. Sep 1, 2025 · In this blog post, I will show you the steps to auto delete old/stale user profiles using Intune. Accept the UAC (User Account Control) prompt. Unfortunately, delprof2 isn't working anymore due to a dat file that gets updated whenever a windows update gets applied to the endpoint. Jan 4, 2025 · A user profile stores all the settings and data specific to a user account in Windows. dat date modified date is being updated with Windows updates and how this feature uses this date inside the ntuser. So if he signs in as a local admin and strips out the user profile prior to profiling someone else on the device, it will actually delete all of the files that the other person syncs inclusive of the data stored online. Feb 6, 2023 · You can disable, remove or delete a User Profile to fix certain User Account related problems in Windows 11/10. Aug 4, 2025 · For future reference, consider implementing Group Policy to automatically delete user profiles older than a set number of days on system restart. I would like to confirm: Does this policy delete the… About This script will delete user profiles based on age. I can capture the profiles that I want but, when it comes to the "bread and butter" I am stumped. Oct 26, 2018 · Delete the user's profile folder from C:\Users (manually or scripted) Using regedit (either manually or scripted) remove the user's registry key from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. It has to run Jul 31, 2023 · Windows 10 has built-in features to free up space by deleting old files in the %temp% directory and Downloads folder. Nov 29, 2017 · Delete old User profiles and files automatically in Windows 11/10 Group Policy setting Delete user profiles older than a specified number of days on system restart will let you autmatically delete old profiles, files, folders. Enable Delete User Profiles Older than a Specified Number of Days on System Restart. Over time, you may find the need to delete user profiles that are no longer needed, whether due to changes in household Feb 11, 2025 · Hello, I am using the Group Policy setting "Automatically delete user profiles older than a specified number of days on system restart" to clean up old user profiles on our Windows systems. If you disable or don't configure this policy setting, User Profile Service won't automatically delete any profiles on the next system restart. The drive is being filled up with user profiles and the GPO (which is working on Windows 7 machines) to delete profiles is not working. Jan 21, 2020 · Delete old User profiles and files automatically in Windows 11/10 Group Policy setting Delete user profiles older than a specified number of days on system restart will let you autmatically delete old profiles, files, folders. User profiles will be deleted at the next server reboot. You may need to catch up to fully understand everything I’m doing in this article, which uses a PowerShell computer start up script to remove old user profiles. May 6, 2025 · Learn how to delete a user profile in Windows 10 using the Registry Editor with our step-by-step guide for a smoother and more efficient process. Jan 15, 2025 · Provides a script to clean up profile folder information and prevent TEMP user profiles from being created. You should delete a user profile if you want to remove the owner's access to your computer. Windows 10 is one of the most popular operating systems globally, thanks to its user-friendly interface and advanced features. Unfortunately, this didn't remove old data folders in C:\\user. Jan 24, 2023 · GPO that automatically deletes old profiles. We will also explain the difference between user profiles and user accounts and how you can delete both of them. Here is how to configure the Recycle Bin in Windows 10/11 to automatically delete old files. There is the "Shared Configuration" in Intune, which automatically cleans up old profiles based on the last login date or the free memory. Nov 17, 2021 · Windows 10 Delete User Profiles Older Than 60 Days Hi. Sep 4, 2024 · Removing user profiles from Windows 10 can help clear up space on your computer and also ensure that your machine is not cluttered with old or unnecessary profiles. Try to bring back your lost user profile right now! Mar 3, 2025 · How to Remove a Profile on Windows 11 Removing a user profile from Windows 11 can be a necessary task for various reasons, including system performance improvement, user management, or simply tidying up the environment for new users. Dec 5, 2024 · Hi all, I’m trying to setup a scheduled task to run a script that will automatically remove all files and folders in “C:\\Users” except the “Public” and “Default” folders. This process ensures that the user’s data, settings, and preferences are wiped from your computer, freeing up space and keeping your system tidy. What's your preferred method for bulk removal of old user profiles on multiple Windows devices. Create a new policy --> "Device Configuration Profiles - Shared multi-user device", enable "Account Management" and set Account Deletion to "At storage space threshold or inactive threshold" and set the parameters to your liking. Nov 17, 2023 · This post tells you how to automatically delete files on Windows 10/11 in different ways. Dayes set to 90. However, as with any operating system, managing user profiles is an essential part of maintaining a smooth and efficient computing experience. How to Delete a User Account Profile in Windows 11/10 [Guide]No matter the reasons behind your decision to change or reset all the preferences and settings f Nov 16, 2025 · This is the friendliest, visual method for how to delete temporary files in Windows 11 and how to clear temp files in Windows 10. Some files are locked once a user logs in and don’t get released until a reboot. Fortunately, Windows 11 provides options to automatically manage these profiles and files. Nov 7, 2023 · Is your PC cluttered with old files that you want to get clear automatically? Here are 3 ways to auto-delete files on Windows 11 and 10 PCs. My code I'm trying to come up with a solution to delete stale profiles in our Windows environment. Running into the same problem as the May 9, 2025 · Learn how to delete user profiles in Windows 11 using PowerShell. Mar 23, 2022 · To delete a user from your Windows 10 computer, go to your Accounts menu. The easiest way to remove User Profile from a Windows computer is by opening the “Advanced System Properties” screen using Run Command. Browse to Computer Configuration\Policies\Administrative Templates\System\User Profiles. Ensure your system stays organized and secure with these easy-to-follow instructions. It’s also great for security too! Today we’re going to cover SEVERAL steps on how to complete this action on a single machine or many machines GPO is Computer Configuration > Administrative Templates > System > User Profiles and I enabled "Delete user profiles older than a specified number of days on system restart" with a value of 180 days. User Profiles in Windows 10 For most users, there isn’t a distinction between a Windows user account and a Windows user profile. This Jul 3, 2025 · How to Delete a User Profile in Windows 10: Simple Steps for All Users Managing user accounts is an essential aspect of maintaining a secure, organized, and efficient Windows 10 environment. This page offers 2 optimal ways to recover deleted files of your user profile. I’d like to remove the user profile and the user’s files (including email) to save space on the laptop before a new user logs in and their documents begin downloading. You can turn on this Group Policy that automatically deletes any user profiles older than a certain period of days on system restart, or use a command-line tool like Delprof2. Users added to the Guest group will have their profile deleted automatically upon logoff, preventing this cleaning issue entirely. Jan 17, 2024 · Don't panic if you mistakenly delete your user profile files. Unfortunately, this didn't remove old data folders in C:\user. Feb 1, 2024 · We show you how to delete a Windows user profile to reset an account via System Properties or the Registry. Feb 11, 2020 · WHy script this when the enterprise approach is GPO. This includes desktop backgrounds, favorites, application settings, and documents. Aug 10, 2019 · Delete old User profiles and files automatically in Windows 11/10 Group Policy setting Delete user profiles older than a specified number of days on system restart will let you autmatically delete old profiles, files, folders. Jan 28, 2021 · For this, you can automatically delete user local/domain profiles older than X days with GPO. Then click on “Show Profiles,” select the Outlook profile and click “Remove. However, power users with lots of apps and files can easily have profiles of 10 GB or larger! When Would You Need to Delete a User Profile? There are a few situations where deleting a user profile makes sense: Corrupted profile – If a profile becomes damaged or unusable, it may need to be removed to restore normal May 25, 2023 · The quickest way to delete a user profile in Windows is through the Advanced system settings. Jun 1, 2024 · So the proper way to remove a domain user’s profile from a Windows 10/11 device is to go to Settings > System > About > Advanced System Settings > Advanced > User Profiles and then remove the user profiles one by one. I checked Learn how to automatically delete old user profiles using Microsoft Intune! In this video, we walk through the full setup process to help IT admins keep devices clean and secure by automating Mar 12, 2025 · If you enable this policy setting, the User Profile Service will automatically delete on the next system restart all user profiles on the computer that haven't been used within the specified number of days. If you use shared devices in your environment, you can use below script to set the number of days after which a user profile is cleaned up on Windows 10 MDM / Intune managed. Jun 18, 2021 · Hi I enabled Computer Configuration\\Administrative Templates\\System\\User Profiles\\Delete User Profiles Older Than xxx GPO and apply to Windows 10 PCs. For example, it can be used in situations such as stationary computers in the meeting room and laptops moving hand-to-hand. Nov 8, 2019 · If you enable this policy setting, the User Profile Service will automatically delete on the next system restart all user profiles on the computer that have not been used within the specified number of days. Month’s on we see a lot of local profiles on the device; a lot of them have not been used in over 60 days. This reduces manual intervention and streamlines profile management across Windows endpoints. Jan 27, 2021 · In that new account, and making sure no excess Profiles, you can use Windows Explorer to delete old profiles in USERS. Oct 28, 2021 · Enable the policy and specify the number of days a user profile is considered active. Step 2: In the OS C: folder, locate and double-click on the Users folder. Apr 15, 2024 · Using the Group Policy setting – Delete user profiles older than a specified number of days on system restart, you can now delete old User profiles and files automatically in See full list on nextofwindows. 2- check the users profile if not logon more than 30 days on this PC, then delete that profile. It is best practice removing user profiles from Windows 10/11 devices that are no longer in use. If May 12, 2023 · In this guide, we will show you how to delete a user profile in Windows 10. Does anyone have a solution to do a thorough Teams removal from every Windows profile that doesn’t depend on using the win32_product command that you are no longer supposed to use to remove applications? I have seen posts where someone posts a script here and then someone else replies Mar 23, 2022 · To delete a user from your Windows 10 computer, go to your Accounts menu. I've already searched for this one but all of the solutions I think I recall reading that this GPO setting had issues with Windows 10, due to the way W10 handles updates and the user profiles, basically changing the last accessed date to be more recent than is correct, meaning that old profiles wouldn't get deleted properly. Aug 1, 2016 · Delete old User profiles and files automatically in Windows 11/10 Group Policy setting Delete user profiles older than a specified number of days on system restart will let you autmatically delete old profiles, files, folders. Whether you’re a system administrator, a technician, or a regular user, knowing how to delete user profiles can help you free up disk space, remove unused accounts, or correct profile-related issues Feb 11, 2025 · How-to shows several ways to delete a user profile in Windows 10 — via Advanced System Properties, manually, and Action1 remote IT management solution. Click on Account, click on Family and other users. Jan 3, 2023 · To remove an Outlook profile on Windows, open Control Panel > User Accounts > Mail. Oct 1, 2021 · In this article, we will discover how to delete a user profile in Windows 10 if you want to completely delete the profile. Revert you changes and relogin and let windows create a fresh user profile. we have problems of hard disk space because user profiles are getting bigger and bigger because of cloud use and modern apps. This is just the local profile and data; the users have already been removed from AD. Or open Outlook > File > Account Settings > Manage Profiles. Simply pick a way to remove files. We use local accounts and sometimes computers are handed over between users at remote locations without IT interfering Jan 15, 2025 · This article provides a script to retrieve profile age and optionally delete aged copies. Oct 7, 2019 · There are a few options available when it comes to cleaning up old and obsolete user profiles on a remote computer. This tool is especially useful for IT administrators and users looking to quickly clean up user profiles that are no longer needed, thus freeing up space and maintaining system efficiency. " However, apparently, this has been broken for many years and has not been addressed by Microsoft. Jun 18, 2025 · Here we will focus on how to delete user profile in Windows 10 either from advanced system properties or registry editor without deleting the user account itself. Unfortunately, this does not always work reliably. I consider this a design flaw on the part of Microsoft and I am not going to waste my time trying to work around that. Within this key, there is a subkey for each Nov 10, 2015 · I wrote a small script which, in my case, runs as a scheduled task on client machines to clear down all domain user profiles that are older than 5 days. Windows 10 Settings has an option (“Storage”) which automatically clears temporary files your apps are not using, files in the Downloads that haven’t been modified in the last x days, or files lying in the Recycle Bin for x days. This topic shows how to delete a user from a member server or computer running on Windows 2000 Professional. While this GP reportedly suffers from the issue I mentioned above, once that issue is resolved it should in theory work. You can enable this option using the Local Group Policy Editor (gpedit. old profile Owh yeah, Windows 10 should not be used a server. Each user profile has an associated registry key, typically located in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry hive. Step 1: Create the ps1 file First use this line to show all user profiles on the machine (this only shows domain user profiles, ignoring local users). Jun 20, 2018 · Open System Properties click the Advanced tab click the Settings button under the User Profiles section find and select the user profile click the Delete button. Oct 22, 2019 · The good old Group Policy “Configuration\Policies\Administrative Templates\System\User Profiles\ Delete User Profiles Older than a Specified Number of Days on System Restart ” isn’t part of Intune yet. com Apr 1, 2025 · In this tutorial, I’ll walk you through how to use PowerShell to automatically delete user profiles older than 30 days. (not include the administrator profile). Do anybody know of any way of automatically deleting old local profiles on Windows? It seems like group policy and other stuff does not work, probably because all the local users c:\users\username\NTUSER. It is recommended to specify the period of 45-90 days here. Mar 21, 2023 · Windows Server RDS farm administrators are often faced with the problem of running out of space on a system drive due to a large amount of user data. This can be helpful if you have a corrupted profile for an account, and wanted to create a new profile for the account. Azure AD need to remove or clean up manually Dec 25, 2011 · Delprof2 – User Profile Deletion Tool 2018-10-09: Delprof2 has issues with UWP apps on Windows 10. The scheduled task will run at logon of any user, and runs every 60 minutes while they are logged in. This GPO is being applied to the Windows 10 computers, verified with gpresult /r and /h. Jan 29, 2025 · Discover how to automatically delete old user profiles using Intune with this comprehensive guide for Windows devices. To list all user profiles on Apr 23, 2018 · Step 1: Steps to Remove a User Account in Settings Press Windows key, click on Settings. Jan 22, 2021 · Hello! We are experiencing problems where the AD feature "Delete profiles after number of days" is not working on Windows 10 machines. Microsoft Intune offers a streamlined solution to automatically delete user profiles that haven’t been used for a specified period, such as 60 days. May 13, 2020 · Click Remove. You need to access the settings, navigate to the appropriate user account section, and remove the profile. Here is my scenerio. This is the script I will be using: Nov 2, 2022 · In this article, we'll show you several ways to delete a user and the associated user profile folder in Windows 10/11. ? Sep 30, 2023 · Rename the corrupt profile and put . Dec 4, 2020 · Delete local User Profiles bulk Dear all, i search for a script to delete all local user profiles (except system users like admin) as bulk. I would like to confirm: Does this policy delete the… Feb 11, 2025 · Hello, I am using the Group Policy setting "Automatically delete user profiles older than a specified number of days on system restart" to clean up old user profiles on our Windows systems. However, if you’re looking to remove a user account (rather than just the user profile), then it’s important to understand the distinction. It is a set of configuration options you can use to manage your system performance, change Windows startup settings, and more. Dec 2, 2022 · Group Policy Microsoft has its own Group Policy that lets you automatically delete old user profiles named “Delete user profiles older than a specified number days on system restart”. Jun 23, 2023 · It is recommended to specify the period of 45-90 days here; After you apply the new Group Policy settings, User Profile Service on your Windows Server will automatically delete the old user profiles. Description framework properties: Aug 10, 2019 · Delete old User profiles and files automatically in Windows 11/10 Group Policy setting Delete user profiles older than a specified number of days on system restart will let you autmatically delete old profiles, files, folders. And of course, you can also use PowerShell to accomplish the same as well. It shows what Windows classifies as temporary and prevents accidental deletion of important user data — except when you explicitly choose to include Downloads or Previous Windows installations. Optimize storage and improve system performance with our solution. Applies to: Windows Server 2016 and later versions, Windows 11, Windows 10 There's a Group Policy "Delete user profiles older than a specified number of days on system restart" to delete aged copies of user profiles. So none of the profiles that I have seen are more than a few days old, even if they belong to an employee who left the company months ago. Get-WMIObject -class Win32_UserProfile Step 2: Select the profiles older than 5 days Pipe Feb 24, 2023 · On Windows 10/11, you can configure Recycle Bin to automatically delete files that have been there for over 1 day, 14 days, 30 days, and 60 days. Feb 3, 2023 · Describes steps to delete a user profile in Windows. old behind the folder name. Feb 5, 2018 · This happened multiple times: You delete a TCP/IP printer (non shared) from a Windows 10 computer You logout When another user logins and attempts to print, the old printer will appear in the printers list (not in the … Delete old user profiles and files automatically in Windows 11/10 Using the Group Poliсy setting – Delete user profiles older than a specified number of days on system restart, you can now delete old User profiles and files automatically in Windows 11/10/8/7. . We will also discover how to reset the user profile to its’ defaults settings, in case you want to keep it without deleting it. The reason why I want to remove Aug 23, 2024 · Here are 4 ways to recover deleted user profile in Windows 10 and 11. Also, when you delete the user accounts, it will delete all files that is associated with it. 9 hours ago Apr 15, 2024 · Using the Group Policy setting – Delete user profiles older than a specified number of days on system restart, you can now delete old User profiles and files automatically in Windows 11/10. Why? Windows 10 stores per-user settings in per-machine database files that are exclusively locked (almost?) all of the time. com, as you look at whatever approach Jan 15, 2025 · Helps resolve an issue in which the Delete user profile older than a specified number of days on system restart Group Policy is applied but doesn't take effect. Removing user profiles in Windows is a great general practice and it helps keep the space to a minimum on the local disk. It can recover files as well. Jun 18, 2021 · This policy setting allows an administrator to automatically delete user profiles on system restart that have not been used within a specified number of days. Feb 10, 2020 · If some student data can’t be deleted it might be the computer needs to be restarted and only logged into with the Admin Account so you can delete the locked files. I want to leave any profile that does not have a creation date older than Sep 15, 2025 · This guide explains how to delete user profiles in Windows. May 8, 2014 · That is why you perform user profile cleanup with Group Policy! How to Delete Old Profiles with Group Policy Create a new GPO named User Profile Cleanup and edit it. This article shows you how to use PowerShell and Group Policies to automatically clean up the Recycle Bin, Downloads, Temp, and Cache folders in the user profiles on Windows. Tested on Windows 10 21H2. Mar 12, 2025 · Discover the ultimate script to clean up junk in user profiles. " In the System window, click on "Advanced system settings Jul 21, 2020 · How can I use SCCM to delete Windows 10 user profiles that have not been used in the last 60 days? We have a lot of kiosk devices used by 100’s of users. " In the System window, click on "Advanced system settings Mar 3, 2025 · How to Remove a Profile on Windows 11 Removing a user profile from Windows 11 can be a necessary task for various reasons, including system performance improvement, user management, or simply tidying up the environment for new users. Nov 5, 2023 · According to Microsoft, the average Windows user profile is around 1 GB. dat file. Jun 9, 2014 · Over the last few articles I’ve been demonstrating ways to leverage PowerShell scripts with Group Policy. I've been working on a script below for this, but I cannot get it to work quite right. Select the user you want to delete under Other users and click on Remove. When you create a new user account on your Windows system, a new user profile is automatically generated. I know there is a GPO labeled " Delete user profiles older than a specified number days on system restart. Why Delete Old User Profiles? Let’s discuss why deleting old user profiles is beneficial: Mar 15, 2024 · In Windows, there is a built-in Group Policy option to automatically delete user profiles older than xx days. can someone help me please I need a script with following conditions: 1- run on windows start up. DAT files are touched every day even if a user has not logged on. Then the proper way to copy the profile to the D: is Press Win + X and select "System. Aug 20, 2020 · This tutorial will show you how to delete the profile of a user account to have a new profile created for the user without deleting their account in Windows 10. msc) or with the domain GPO management console (gpmc. We are running into an issue on Windows 10 computers in a shared space that are accessed by many users. Please see "How it Works" section that explains how profile age and cleanup occurs. GPO#2: (User Configuration > Policies > Windows Settings > Folder Redirection) configured to But I found that after Windows 10 1809, if you rename or delete the user folder then it breaks the Start button for every user. Aug 20, 2024 · Learn how to effortlessly remove users from Windows 10 with our step-by-step guide. March 2023 Old profiles on a device can unnecessarily burden local storage. Scripts to clean profile folder and prevent TEMP user profile creation - Windows Server Dec 16, 2020 · User Accounts vs. Open Windows Explorer in an Admin Account that is not one of the USER Profiles you wish to delete. Prefer video? Watch a video version of this blog post: How to Delete User Sep 19, 2022 · If you want to delete a Domain User Profile on a Windows 11/10 computer, you can do so using any of the method described in this post. Can anyone suggest a script or process that could be implemented to remove any profile that hasn't been logged in to for the past 60 days? Bonus goal is to have an exclusion list for profiles I want to hang on to. I need to deploy new Teams to existing systems and get rid of any leftover files from classic Teams. filecite turn0file12 Sep 24, 2024 · Learn how to delete a user profile on Windows 10 with our easy step-by-step guide. It could save you a lot of time down the line. It covers removing user profiles in both Windows 11 and Windows 10 and includes multiple methods, as well as precautions and troubleshooting tips. I have some Windows 10 that have gigabytes of old user profiles taking up disk space that doesn't need to be taken up. I found another article that stated how the NTUser. Dec 21, 2023 · The User Profile Service keeps track when a profile is being created. Note: One day is interpreted as 24 hours after a specific user profile was accessed. This works using a scheduled task that writes a date to a file in the user profile. I am working on trying to automate cleaning up local user profiles on some machines that after awhile run into HDD space issues. Learn how to do this. Learn how to delete domain user profiles in Windows using effective and secure methods. The problem with this (as many people have already discovered) is that Windows will often update all the profiles on the computer. Feb 17, 2020 · 0 I am trying to remove all user profiles except for certain profiles I specify (administrator, Public, default, DOMAIN\administrator, etc) I am able to do this successfully and exclude a single user profile, however I am having issues with the correct syntax to exclude multiple user profiles. Discover how to effortlessly utilize a PowerShell script to delete user profiles older than 30 days, streamlining your system management with ease. Step 3: Right-click on the User Profile you want to delete and click on Delete from the context menu. Follow step-by-step instructions to remove old or unused profiles safely and efficiently. May 31, 2021 · This policy setting allows an administrator to automatically delete user profiles on system restart that have not been used within a specified number of days. msc). How to Delete Old User Profiles Using GPO and PowerShell? No reason to do this from scratch, leverage what others have provided Use PowerShell to remove local profiles How to delete user profiles older than a specified number of days in Windows as well as the modules from the MS powershellgallery. The Profile Cleanup Tool is a PowerShell script designed to streamline the process of managing user profiles on a Windows system. GPO#1: (Computer Configuration > Administrative Templates > System > User Profiles) configured to delete user profiles older than 30 days. Learn how to delete a Microsoft 365 user account, what to do with the user's email and OneDrive content, and whether to keep the product license. When this period is over, Windows user profile service will automatically delete the profile at the next restart. I used to never bother with these but lately those old profiles have been showing up with old software, Store apps, and files that are either vulnerable or end of life. This not only frees up space on the device, but is also beneficial from a security standpoint. Quickly remove user profiles in Windows and explore the various ways to delete the user profile registry from this article: Windows user profiles are a unique feature that allows users to configure personal preferences, files, and settings and separately identify themselves from other users using the same device May 8, 2014 · That is why you perform user profile cleanup with Group Policy! How to Delete Old Profiles with Group Policy Create a new GPO named User Profile Cleanup and edit it. Jan 10, 2025 · In environments where multiple users access the same computer, the accumulation of old user profiles and unused files can lead to system slowdowns, increased disk usage, and security risks. Click Delete account and data. Mar 23, 2023 · Remove old user profiles - Intune 23. Free up space and manage user accounts effortlessly. Nov 13, 2023 · I deleted a old user account call clayt but it keeps coming back in the Users folder with a path of C:\Users\clayt\AppData\Local\Temp, how do I kill it for good? Oct 25, 2023 · Group Policy: Automatically Delete User Profiles Older Than Certain Number of Hi I enabled Computer Configuration\Administrative Templates\System\User Profiles\Delete User Profiles Older Than xxx GPO and apply to Windows 10 PCs. Feb 9, 2025 · Deleted a user account? Follow this ultimate guide to recover deleted User account profile in Windows 11/10. Jan 20, 2021 · script to delete users profile hello guys, I'm new here.