Generate summary with AI

You’ve probably wondered how to delete a user from your Windows PC before. Maybe you’ve been doing some digging and found a suspicious user in your system that you don’t recognize, just went through a breakup and want to remove your ex’s profile, or work in an enterprise IT environment and need a faster and simpler way to delete a user from multiple endpoints.

Here’s all you need to know about deleting user profiles in Windows, from the simplest single-endpoint solution to enterprise-scale methods that automate the process.

WARNING: What to do before deleting user profiles

Deleting a user profile removes the local registry hive (HKCU), cached credentials, and user-specific configurations. This means:

  • Loss of personalized settings, including wallpapers, theme preferences, and application configurations reverting to defaults.
  • Installed applications tied to the user may lose licensing or stored preferences.
  • Cached credentials for network drives, VPNs, or websites are cleared.
  • Temporary files, browser caches, and cookies are deleted, which may affect logins or workflow continuity.

IT teams should inform users in advance, ensure shared resources remain unaffected, and consider profile recreation automation to restore default settings without disrupting access. Additionally, identify and secure all essential data to prevent loss, including:

  • Documents, Desktop, Downloads, user-generated files
  • Emails & Calendars (PST/OST files) if using Outlook or similar clients
  • Application Data, such as settings and preferences from apps like browsers, IDEs, or design software
  • Cloud-synced content, OneDrive, Google Drive, or Dropbox local caches
  • Certificates & keys, VPN, or Wi-Fi
  • Maintain a temporary restore point before deletion

Lastly, you’ll need administrative privileges to delete a user profile. Standard users can’t remove other profiles due to the risk of system instability and data loss.

Here’s how to verify privileges:

  1. Open Control Panel by searching “control panel” in the Windows Search box
  2. Click on User Accounts
  3. Click Manage Accounts or Manage Another Account
  4. You’ll see whether each added user has administrator privileges or not
Manage Accounts Administrator

A local administrator can add a user to the Administrators group via:

  • Control Panel > User Accounts > Change account type
  • Computer Management > Local Users and Groups > Groups > Administrators > Add

» Not sure what the problem is? Why not run a PC diagnostics report

4 simplest methods for deleting user profiles in Windows

1. Via Windows GUI: The standard, recommended approach

Here’s what makes this method great:

  • It’s built into Windows (no scripts needed)
  • It cleans up both files AND registry entries properly, including cached credentials and settings
  • It’s visual, so you can see what you’re deleting easily
  • It works consistently across Windows 7, 8, 10, 11, and Server editions

This is permanent, so be sure to backup any important data first. Additionally, the user being deleted can’t be logged in or it won’t work.

Step 1: Open System Properties

  1. Press Windows key + R on your keyboard
  2. Type sysdm.cpl and press Enter
Open local group policy
System Properties Window

Step 2: Navigate to User Profiles

  1. Click the Advanced tab at the top
  2. Under “User Profiles” section, click the Settings button
Open User Profile in System Properties

From here, you’ll see a list of all user profiles on the computer. All you have to do is click on a profile and click the “Delete” button, then confirm when Windows asks if you’re sure. The profile will disappears from the list and the user folder is removed from C:\Users\ and and associated registry keys (HKCU).

On earlier versions of Windows (7 & 8.1), you’ll need to access the User Profiles section through Control Panel > System > Advanced system settings > User Profiles > Settings.

2. With PowerShell: Best for managing multiple computers remotely

This method is better than the standard method for a few reasons:

  • Automation & scalability: Essential scripts can remove multiple profiles simultaneously across workstations or servers.
  • Remote management: Using PowerShell Remoting (Enter-PSSession or Invoke-Command), admins can manage user profiles without physically accessing each endpoint.
  • Auditability: Logging can track which profiles were deleted and when, ensuring regulatory compliance.
  • Consistency: Eliminates errors that may occur with manual GUI deletion.

Instead of having to spend hours manually deleting a user from from different endpoints with Windows GUI, a PowerShell script can run remotely on multiple machines. With Atera’s RMM platform, it becomes even easier to execute PowerShell scripts remotely from a central location while managing your entire IT infrastructure.

Here’s how:

Step 1: Open PowerShell as administrator

  1. Search for “powershell” in the Windows search box
  2. Click “Run as administrator
  3. Click “Yes” when prompted
Open Powershell as administrator

Step 2: View all user profiles

Paste the PowerShell command:

The Script:

Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *

Get-CimInstance Win32_UserProfile | Select LocalPath, SID, Loaded
Script copied to clipboard
Powershell show all user command

This shows you a list of all profiles with:

  • LocalPath: The folder location (e.g., C:\Users\JohnDoe)
  • SID: A unique security identifier
  • Loaded: Whether someone is currently logged in with that profile (True/False)

Step 3: Delete the Specific Profile

There are 2 commands you can use to delete a user. The first one is to delete the specific profile:

The Script:

Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *

Get-CimInstance Win32_UserProfile | Where-Object {$_.LocalPath -like "*Username*"} | Remove-CimInstance
Script copied to clipboard

Replace “Username” with the actual username you want to delete.

PowerShell delete specific user command

The 2nd one is to delete the full file path:

The Script:

Atera does not guarantee the integrity, availability, security, virus-free, safety, lawfulness, non-infringement, rights’ status, or functionality of the scripts. The use of the shared scripts is at your own risk. Scripts are provided “AS IS”. *

Get-CimInstance Win32_UserProfile | Where-Object {$_.LocalPath
Script copied to clipboard
Powershell delete file path command

3. With Group Policy: Great for automation

Group Policy Editor adds an extra layer of automation to deleting user profiles above just the remote execution of scripts across IT environments. Instead, here’s what it offers:

  • Set it and forget it: Configure once, works automatically forever.
  • Prevents profile bloat: Stops old profiles from accumulating over time.
  • Enterprise-wide deployment: Apply to hundreds/thousands of machines simultaneously.
  • Consistent enforcement: Same cleanup rules across all devices.
  • Reduces manual work: IT doesn’t chase down old profiles manually.

Here’s how:

Step 1: Open Group Policy Editor and navigate to User Profiles

  1. Press Windows key + R
  2. Type gpedit.msc and press Enter
  3. Go to this exact path: Computer Configuration > Administrative Templates > System > User Profiles
Open local group policy editor
User profile in group policy editor

» Here’s the simplest way to open Local Group Policy Editor

Step 3: Enable Automatic Deletion

  1. Find the policy: “Delete user profiles older than a specified number of days on system restart
  2. Double-click it
  3. Select “Enabled
  4. Set the number of days (e.g., 90 days for 3 months)
  5. Click OK
Delete user profiles on group editor policies

WARNING: Make sure you set appropriate inactivity periods. For example, if you set it to 2 weeks, you’ll accidentally delete the profiles of employees that go on vacation.

Group Policy automation simplifies some of the IT workload. Rather than technicians manually hunting down and deleting old profiles across dozens or hundreds of endpoints, Atera’s RMM platform enables IT teams to automate profile management tasks across multiple endpoints through scripting and remote execution capabilities.

» Learn more about group policy management with Atera

4. With Command Prompt: Good for older Windows versions

This approach is less thorough and more complicated than other versions. The GUI method is easier for one-off deletions. PowerShell is more powerful for automation and remote management. Command Prompt sits awkwardly in the middle: not as simple as GUI, not as capable as PowerShell.

However, it can work better in certain scenarios, including:

  • Legacy systems (Windows 7/8.1) where PowerShell cmdlets are limited
  • Quick fixes on standalone PCs without domain management
  • Batch scripts for automated logon/logoff cleanup
  • Minimal environments where GUI access is restricted

Here’s how:

Step 1: Open Command Prompt as administrator

  1. Search “command prompt” in the Windows search box
  2. Click “Run as administrator
  3. Click “Yes” when prompted
Opem Command Prompt as administrator

Step 2: Delete the user account

Enter the command: net user Username /delete

Replace “Username” with the actual account name.

Delete user command in command prompt

Step 3: Delete the leftover profile folder

Enter the command: rd /s /q “C:\Users\Username”

Replace “Username” with the actual account name

Delete leftover data in command prompt

This removes the user’s folder and all contents permanently. If you forget to add in this second command, there’s a risk of orphaned data.

Troubleshooting: What to do if the deletion failed

When a Windows profile becomes corrupted or partially deleted, standard removal methods (GUI, PowerShell, or Command Prompt) may fail completely. The profile appears stuck, meaning you can’t delete or use it.

Here’s how to resolve this:

Step 1: Log in with a different admin account

You can’t fix a corrupted profile while using it. Switch to another administrator account.

Step 2: Back up any recoverable data

Before doing anything else, copy critical files from C:\Users\<Username> to a safe location.

Step 3: Clean up the Windows Registry

This is where the real problem usually lives; orphaned registry entries that prevent proper deletion.

  1. Press Windows key + R, type regedit, and press Enter
  2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  3. Look through the listed SIDs (long strings of numbers) to find the one linked to the corrupted profile
  4. Right-click the SID key and select Delete
  5. Confirm the deletion

» Need a faster way? Learn how to use Atera’s in-app registry editor

Step 4: Manually remove the leftover folder

Once the registry is clean, delete C:\Users\<Username> manually through File Explorer or Command Prompt.

» Got an issue? Don’t miss our guides to IT crisis management and registry editor challenges

Embrace the shift from reactive to proactive profile management

User profile management reveals a fundamental truth about modern IT: manual processes don’t scale, and reactive troubleshooting wastes time your team doesn’t have. The friction that comes from hunting down corrupted registry entries at midnight or explaining to an executive why their files disappeared isn’t worth it or even sustainable.

Atera’s Agentic AI platform with built-in RMM capabilities enables centralized endpoint monitoring and automated script deployment. Monitor disk space across endpoints, execute cleanup scripts remotely, and let Robin handle routine user support requests before they escalate to tickets.

» Interested? Start your free trial with Atera

Was this helpful?

* Scripts are provided for your benefit. You understand and acknowledge that when downloading and/or copying and/or using the Scripts: (i) you may be exposed to Scripts from a variety of sources, (ii) Atera is not responsible and takes no liability for the accuracy, usefulness, integrity, lawfulness, title or infringement, security, functionality or Intellectual Property Rights of, or relating to, such Scripts; and (iii) the Scripts are provided “AS IS” and “AS AVAILABLE”, and may have errors, and may not be malware-free, and that your interactions with, and use of, the Scripts is at your sole risk and free will. You hereby agree to waive, and hereby do waive, any legal or equitable rights or remedies you may have against Atera with respect to the Scripts.

Related Articles

What is IT Management

Read now

What is infrastructure monitoring?

Read now

CapEx vs. OpEx

Read now

How to restart a remote computer using Windows

Read now

Endless IT possibilities

Boost your productivity with Atera’s intuitive, centralized all-in-one platform