Очистка профиля пользователя windows 10

Администраторы время от времени должны удалять старые профили пользователей (уволенные пользователи, неактивные пользователи, и т.д.) в каталоге C:\Users на рабочих станциях и серверах Windows. Чаще всего с задачей очисткой профилей пользователей Windows сталкиваются на терминальных серверах RDS (Remote Desktop Services).

Основная проблема терминальных серверов – постоянный рост размеров каталогов профилей пользователей на диске. Частично эта проблема решается политиками квотирования размера профиля пользователя с помощью FSRM или NTFS квот, использованием профилей типа FSLogix или User Profile Disk, перемещаемыми папками и т.д. Но при большом количестве RDS пользователей в папке C:\Users со временем накапливается огромное количество каталогов с неиспользуемыми профилями пользователей.

Содержание:

  • Как вручную удалить профиль пользователя в Windows?
  • Групповая политика для автоматической очистки старых профилей
  • PowerShell скрипт для удаления старых профилей пользователей в Windows

Как вручную удалить профиль пользователя в Windows?

В Windows вы можете вручную удалить профиль пользователя через панель управления.

  1. Откройте Advanced System Settings (команда
    SystemPropertiesAdvanced
    ) -> User Profiles -> Settings;
  2. В этом окне перечислен список всех профилей пользователей (локальных и доменных), которые хранятся на этом компьютере. Размер каждого профиля пользователя на диске указан в столбце Size.
  3. Выберите пользователя, чей профиль нужно удалить и нажмите кнопку Delete.
    Удалить с диска профиль пользователя Windows вручную

В Windows 11/10 и Windows Server 2022/2019 вы можете удалить профили пользователей с диска через приложение Settings. Перейдите в раздел Accounts -> Access work and school (или выполните команду быстрого доступа
ms-settings:otherusers
). Выберите пользователя и нажмите Remove чтобы удалить его данные с компьютера.

ms-settings: удалить с диска профиль пользователя windows 11

При корректном удалении профиля пользователя с диска будет удален каталог профиля в C:\Users и запись о пользователе в реестре.

Многие начинающиеся администраторы пытаются вручную удалить каталог с профилем пользователя из папки C:\Users. В этом случае нужно обязательно вручную удалить информацию о профиле из реестра Windows:

  1. Откройте редактор реестра
    regedit.exe
    ;
  2. Перейдите в ветку HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  3. Для каждого пользователя, выполнившего локальный вход в систему (этот метод входа должен быть разрешен пользователю настройками параметра Allow log on locally в GPO), создается отдельная ветка с SID пользователя в качестве имени;
  4. Вы можете найти раздел реестра, соответствующий пользователю по SID, или можете вручную просмотреть содержимое всех вложенных разделв, пока не найдете раздел, в котором значение ProfileImagePath указывает на каталог с профилем пользователя на диске (например,
    C:\Users\kbuldogov
    );

    путь к профилю пользователя в реестре ProfileImagePath

  5. Удалите данный раздел реестра, чтобы завершить корректное удаление профиля.

Также вы можете удалить профиль конкретного пользователя с помощью PowerShell:

Get-CimInstance -Class Win32_UserProfile | Where-Object { $_.LocalPath.split(‘\’)[-1] -eq 'kbuldogov' } | Remove-CimInstance

Эта команда удалит как каталог на диске, так и ссылку на профиль пользователя kbuldogov в реестре HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.

Эта команда будет работать как в Windows PowerShell, так и в новых версиях PowerShell Core 6.x,7.x

Можно удалить профиль пользователя на удаленном компьютере с помощью PowerShell Remoting и командлета Invoke-Command:

$compname="wks21s32"
$user = "kbuldogov"
Invoke-Command -ComputerName $compname -ScriptBlock {
param($user)
Get-CimInstance -Class Win32_UserProfile | Where-Object { $_.LocalPath.split(‘\’)[-1] -eq $user } | Remove-CimInstance
} -ArgumentList $user

Групповая политика для автоматической очистки старых профилей

В Windows есть специальный параметр групповой политики для автоматического удаления старых профилей пользователей старше xx дней. Вы можете включить этот параметр с помощью локального редактора GPO (
gpedit.msc
) или с помощью консоли управления доменными GPO (
gpmc.msc
). В этом примере на назначим политику автоматической очистки профилей на хосты в ферме RDS, которые вынесены в отдельный контейнер (Organizational Unit) Active Directory.

Прежде чем применять политику удаления старых профилей ко всем хостам, настоятельно рекомендуем проверить ее на тестовом сервере. Выведите один из серверов RDSH в режим обслуживания и протестируйте политику на нем.

  1. Найдите OU с компьютерами/серверами, на который вы хотите применить политику очистки старых профилей пользователей. Щелкните по OU и выберите Create a GPO in this domain and Link it here;
  2. Укажите имя политики и отредактируйте GPO;
  3. Перейдите в раздел Конфигурация компьютера -> Административные шаблоны -> Система -> Профили пользователей (Computer Configuration -> Administrative Templates -> System -> User Profiles);
  4. Откройте параметр “Удалять при перезагрузке системы профили пользователей по истечении указанного числа дней” (Delete user profiles older than a specified number days on system restart);
  5. Включите политику и укажите через сколько дней профиль пользователя считается неактивным и “Служба профилей пользователей Windows” можно автоматически удалить такой профиль при следующей перезагрузке. Обычно тут стоит указать не менее 45-90 дней;
    gpo удалить профили старше 60 дней при перезагрузке

  6. После применения новых настроек групповых политк, служба User Profile Services на ваших серверах Windows будет автоматически удалять старые профили пользователей. Удаление выполняется при перезагрузке сервера.

При использовании этой политики нужно быть уверенным, что при выключении/перезагрузке сервера нет проблем с системным временем (время не сбивается), иначе могут быть удалены профили активных пользователей.

Другой недостаток — вы не можете запретить удаление определенных профилей, например, локальных учетных записей, администраторов и т.д.

В версиях до Windows 11/10 и Windows Server 2022/2019 эта политика работала некорректно. Дело в том, что неактивноть профиля пользователя ранее определялась по дате именения файла NTUSER.dat. При установке обновлений Windows, служба Trusted Installer может менять дату изменения файла NTUSER.dat в профиле каждого пользователя. В результате служба Win32_UserProfile считает, что профиль использовался недавно.

В современных версиях Windows эта политика проверяет активность профиля пользователей по параметрам LocalProfileUnloadTimeLow и LocalProfileUnloadTimeHigh в ветке
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<User Sid>
.

LocalProfileLoadTimeLow в ветке реестра ProfileList

Вы можете получить значения параметров реестра LocalProfileLoadTimeLow и LocalProfileUnloadTimeHigh в привычном формате времени с помощью скрипта:

$profilelist = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
foreach ($p in $profilelist) {
    try {
        $objUser = (New-Object System.Security.Principal.SecurityIdentifier($p.PSChildName)).Translate([System.Security.Principal.NTAccount]).value
    } catch {
        $objUser = "[UNKNOWN]"
  }
    Remove-Variable -Force LTH,LTL,UTH,UTL -ErrorAction SilentlyContinue
    $LTH = '{0:X8}' -f (Get-ItemProperty -Path $p.PSPath -Name LocalProfileLoadTimeHigh -ErrorAction SilentlyContinue).LocalProfileLoadTimeHigh
    $LTL = '{0:X8}' -f (Get-ItemProperty -Path $p.PSPath -Name LocalProfileLoadTimeLow -ErrorAction SilentlyContinue).LocalProfileLoadTimeLow
    $UTH = '{0:X8}' -f (Get-ItemProperty -Path $p.PSPath -Name LocalProfileUnloadTimeHigh -ErrorAction SilentlyContinue).LocalProfileUnloadTimeHigh
    $UTL = '{0:X8}' -f (Get-ItemProperty -Path $p.PSPath -Name LocalProfileUnloadTimeLow -ErrorAction SilentlyContinue).LocalProfileUnloadTimeLow
    $LoadTime = if ($LTH -and $LTL) {
        [datetime]::FromFileTime("0x$LTH$LTL")
    } else {
        $null
    }
    $UnloadTime = if ($UTH -and $UTL) {
        [datetime]::FromFileTime("0x$UTH$UTL")
    } else {
        $null
    }
    [pscustomobject][ordered]@{
        User = $objUser
        SID = $p.PSChildName
        Loadtime = $LoadTime
        UnloadTime = $UnloadTime
    }
} 

получить время последнего входа в профиль в windows

PowerShell скрипт для удаления старых профилей пользователей в Windows

Вы можете удалять профили неактивных или заблокированных пользователей с помощью скрипта PowerShell.

Сначала попробуем подсчитать размер профиля каждого пользователя в папке C:\Users c помощью простого скрипта из статьи “Вывести размер папок с помощью PowerShell”:

gci -force ‘C:\Users\’-ErrorAction SilentlyContinue | Where { !($_.Attributes -match " ReparsePoint") }| ? { $_ -is [io.directoryinfo] } | % {
$len = 0
gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % { $len += $_.length }
$_.fullname, ‘{0:N2} GB’ -f ($len / 1Gb)
$sum = $sum + $len
}
“Общий размер профилей”,'{0:N2} GB’ -f ($sum / 1Gb)

Итого суммарный размер всех профилей пользователей в каталоге C:\Users около 22 Гб.

Теперь выведем список пользователей, профиль которых не использовался более 60 дней. Для поиска можно использовать значение атрибута профиля LastUseTime.

Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and ($_.ConvertToDateTime($_.LastUseTime) -lt (Get-Date).AddDays(-60))}| Measure-Object

У меня на терминальном сервере оказалось 143 профиля неактивных пользователей (общим размером около 10 Гб).

получить список неактивных пользователей с профилями

Следующий PowerShell скрипт выведет список подробную информацию о профилях пользователей, которые не обновлялись более 60 дней. Скрипт сконвертирует SID пользователя в имя, посчитает размер профиля каждого пользователя и выведет все в таблице:

$allprofilesinfo = @()
$OldProfiles=Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and ($_.ConvertToDateTime($_.LastUseTime) -lt (Get-Date).AddDays(-60))}
Foreach ($OldProfile in $OldProfiles)
   {$objSID = New-Object System.Security.Principal.SecurityIdentifier ($OldProfile.SID)
    $objUser = $objSID.Translate( [System.Security.Principal.NTAccount])
        $userinfo = New-Object PSObject -Property @{
            userName = $objUser.Value
            ProfilePath = $OldProfile.localpath
            LastUsedDate = $OldProfile.ConvertToDateTime($OldProfile.LastUseTime)
            FolderSize =  "{0:N2} GB" -f ((gci –force $OldProfile.localpath –Recurse -ErrorAction SilentlyContinue| measure Length -s).sum / 1Gb) 
        }
    $allprofilesinfo += $userinfo
   }
$allprofilesinfo 

скрипт для получения размера старых профилей на диске

Чтобы удалить все эти профили достаточно добавить перенаправить список на команду Remove-WmiObject (перед использование скрипта удаления желательно несколько раз перепроверить его вывод с помощью параметра –WhatIf ):

Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and (!$_.Loaded) -and ($_.ConvertToDateTime($_.LastUseTime) -lt (Get-Date).AddDays(-30))} | Remove-WmiObject –WhatIf

Как мы уже упомянули выше, при установке некоторых обновлений Windows, служба Trusted installer может менять дату изменения файла NTUSER.dat в профиле каждого пользователя.

На скриншоте выше видно, что все профили были изменены примерно в одно и тоже время. Проверьте дату последней установки обновлений в Windows:

gwmi win32_quickfixengineering |sort installedon  |select InstalledOn -Last 1

Или с помощью модуля PSWindowsUpdate:

Get-WUHistory | Select-Object -First 20

Скорее всего она совпадет с датой изменения профилей. Поэтому в старых версиях Windows можно получить список неактивных профилей с помощью другого скрипта, который проверяет атрибуту lastwritetime каталога пользователя:

$USERS= (Get-ChildItem -directory -force 'C:\Users' | Where { ((Get-Date) — $_.lastwritetime).days -ge 60 } | % {'c:\users\' + $_.Name})
foreach ($User in $USERS) {
Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and (!$_.Loaded) -and ($_.LocalPath -eq $User)} | Remove-WmiObject WhatIf }

Чтобы не удалять профили некоторых пользователей, например, специальные аккаунты System и Network Service, учетную запись локального администратора, пользователей с активными сессиями, список аккаунтов-исключений), нужно модифицировать скрипт следующим образом:

#Список аккаунтов, чьи профили нельзя удалять
$ExcludedUsers ="Public","zenoss","svc",”user_1”,”user_2”
$LocalProfiles=Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and (!$_.Loaded) -and ($_.ConvertToDateTime($_.LastUseTime) -lt (Get-Date).AddDays(-60))}
foreach ($LocalProfile in $LocalProfiles)
{
if (!($ExcludedUsers -like $LocalProfile.LocalPath.Replace("C:\Users\","")))
{
$LocalProfile | Remove-WmiObject
Write-host $LocalProfile.LocalPath, "профиль удален” -ForegroundColor Magenta
}
}

Вы можете настроить запуск этого скрипта через shutdown скрипт групповой политики или по расписанию заданием планировщика. (перед настройкой автоматического удаления профилей внимательно протестируйте скрипт в своей среде!).

Можно модифицировать скрипт, чтобы автоматически удалять пользователи всех пользователей, которые добавлены в определенную группу AD. Например, вы хотите автоматически удалять профили уволившихся пользователей. Просто добавьте такие учетные записи в группу DisabledUsers и выполните на сервере скрипт:

$users = Get-ADGroupMember -Identity DisabledUsers | Foreach {$_.Sid.Value}
$profiles = Get-WmiObject Win32_UserProfile
$profiles | Where {$users -eq $_.Sid} | Foreach {$_.Delete()}

Sometimes deleting your user profile in Windows 10 can solve several issues. For example, if your user profile becomes corrupted, if certain apps don’t work anymore, or if you want to reset your profile’s settings back to default, this might help resolve it. What’s important to know is how to delete a user profile without deleting your user account.

In this guide, we will show you how to delete a user profile in Windows 10. We will also explain the difference between user profiles and user accounts and how you can delete both of them.

What is the Difference Between User Accounts and User Profiles

Many people tend to think that a user account and a user profile in Windows are one and the same. However, they are two completely different sets of data.

The first step of setting up your computer requires creating an administrator user account to allow you to sign in to your PC or laptop. If you share your computer with other family members or with a coworker, you can create separate user accounts. Each user account can be protected with a password, so you don’t have to worry about other people accessing your account.

Every time you turn your device on, you are able to choose which user account you want to log into. If you want to create a new user account on your Windows 10, you can choose between an administrator account, a standard account, and a standard account with family safety. Administrator accounts are the only types of user accounts that you can use to make changes to system settings and other accounts on your device.

Switching between different user accounts in Windows 10 is very simple. Here’s how it’s done:

  1. Click on the Start Menu in the bottom-left corner of your screen.

  2. Go to your user account’s icon on the left sidebar.

  3. Choose Sign out.

  4. Select a different user account.

  5. Enter the password and press the Enter key on your keyboard.

A user profile in Windows 10, on the other hand, refers to all your personal preferences, app and desktop settings, and other forms of information within your user account.

  • If you’re interested in how you would locate your user profile, go to My Computer or This PC and then to Local Disk (C:).
  • Proceed to Users and then to your account’s username. In this folder, you’ll be able to see various subfolders, such as Contacts, Desktop, Music, Downloads, Favorites, Pictures, Links, Saved Games, Videos, and many more.

Your user profile is comprised of all the settings and personalization you applied to the device. Even the slightest changes made to your device, such as backgrounds and screen savers, all fall into the category of a user profile.

As mentioned before, user profiles are a set of folders that help personalize your user account. If you want to delete your user profile, make sure you are doing it from another user account and not from the profile that will soon be deleted.

In addition, the account you will be using to delete the user profile is required to have administrative privileges. Once a user profile is deleted, all the photos, videos, documents, and other types of files will be deleted as well. That’s why it’s important to back all of these files up or create copies of them that can be stored in a safe place.

There are two ways you can delete a user profile in Windows 10, with System Properties or manually. For starters, let’s cover the first method:

  1. Press the Windows + R keys on your keyboard simultaneously; this will launch the Run dialog on your screen.
  2. In the Open box, type in systempropertiesadvanced.
  3. Click on OK. This will open the System Properties window.
  4. Choose Advanced from the top menu.
  5. Under User Profiles, click on the Settings… button.
  6. The User Profiles window will appear. Under Profiles stored on this computer, choose the profile that you want to delete.
  7. Select Delete.
  8. Confirm that you want to delete the user profile by clicking on Yes in the pop-up window.

That’s it! The next time you sign in to your user account, Windows 10 will automatically create a new profile with default settings and preferences. There is another way you can delete a user profile in Windows 10. This is how it’s done:

  1. Type This PC into the Search bar on your desktop and open it.

  2. Now, double-click on Local Disk (C:).

  3. Proceed to the Users folder.

  4. Find the user profile that you want to delete and right-click on it.

  5. Select Delete from the drop-down menu.

  6. Then, press the Windows + R key on your keyboard simultaneously.

  7. Type in regedit in the box and hit Enter to open the Registry Editor.

  8. Copy this Registry Key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  9. Paste it into the Registry Editor.

  10. Go to the ProfileList folder, and then find ProfileImagePath. It should be listed as C:\Users\[username], except replace [username] with the exact name of your user profile.

  11. Delete this file and any identical files you will find in other folders.

  12. Confirm that you want to delete these files from the Registry Editor.

  13. Close the Registry Editor and restart your computer to finish the process.

You will notice that there will be a new, default user profile in Local Disc (C:), and you won’t see the deleted user profile anymore.

Deleting a User Account in Windows 10

Deleting a user account in Windows 10 is fairly simple, and it only takes a few quick steps. If you have multiple accounts on your computer, then you should know how to delete them in case you don’t need them anymore.

To delete a user account in Windows 10, follow the steps below:

  1. Click on the Start button in the bottom-left corner of your screen.

  2. Click on the Settings icon on the left sidebar.

  3. From here, click on Accounts.

  4. Proceed to Family & other users.

  5. Under Other users, find the user account that you want to delete.

  6. Click on their username and select Remove.

  7. Confirm that you want to remove this account and choose Delete account and data.

Doing this will delete the user account and all the offline files it contains. However, it will not delete any files that are stored in the cloud.

Additional FAQs

How do I restore a deleted user profile?

In case you accidentally deleted a user profile, or if there are some files you’d like to restore, there is a way to restore that user profile. That’s why it’s always important to have all your files backed up before you delete a user profile.

Here’s how you can restore a deleted user profile in Windows 10:

1. Click on the magnifying glass in the bottom-left corner of your screen.

2. Type in Command Prompt and click Open.

3. Copy whoami /user and paste it into Command Prompt.

4. Press Enter.

5. Under User Name SID, you’ll be able to see the Security Identifier for your user profile.

6. Press the Windows + R key.

7. Type in regedit and hit Enter to open the Registry.

8. Copy HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows NT>CurrentVersion>ProfileList and paste it into the Registry.

9. Under ProfileList, find the same SID from the Command Prompt.

10. Click on the right SID folder.

11. Find ProfileImagePath on the right side of the Registry and double-click on it.

12. Under Value data, type in C:\Users\ and the correct username of your user profile.

13. Click on OK.

14. Double-click on State; it’s under ProfileImagePath on the right pane.

15. Under Value data, write 0.

16. Select OK.

You’ve successfully managed to restore your user profile. The next time you go to Local Disc (C:), you’ll see your restored user profile there.

Delete All Unwanted User Profiles

Now you know how to delete a user profile in Windows 10. You also know the difference between user profiles and user accounts in Windows 10, as well as how to delete a user account. Deleting and restoring user profiles can be a bit tricky, but as long as you follow our guide, you’ll get it done effortlessly.

Have you ever deleted a user profile in Windows 10 before? Did you use any of the methods explained in this guide? Let us know in the comments section below.

Sometimes, a user might want to delete a user profile from Windows 10 for various reasons. These reasons may include file corruption inside the user profile, specific apps misbehaving, or a complete reset from the user to get a fresh start. 

Windows 10 lets you delete a user profile without deleting a user account. Before getting into the details, we will start by defining the user profiles, so you can better distinguish between a user profile and a user account.

What is a User Profile on Windows

A user profile is a directory of stored user settings and information for the related user account. To understand it better, perform the following actions.

Step 1. Power on your PC/laptop with Windows 10 operating system and click on the «This PC» icon. 

this pc

Step 2. Here, you will probably see a drive with the name Local Disk (C:), click on it.

local disk profile

Step 3. Now, click on «users» to check all user profiles on your system.

users

You can see the content inside a user profile. It contains different files and folders where information is stored. 

On the other hand, a user account is your entry point to get into Windows 10. It is created while setting up your Windows after installation, and you can sign in to your PC/laptop with a user account and create multiple user profiles inside.

How to Delete a User Profile From Windows 10

There are three ways to delete a user profile in Windows 10: 

  1. Method 1. Manually delete a user profile
  2. Method 2. Delete a user profile through system properties
  3. Method 3. Delete a user profile from the settings app

Step-by-step process to manually delete a user profile

Step 1. Power on your PC/laptop with Windows 10 operating system and click on the «This PC» icon.

Step 2. Here, you’ll see one or multiple hard drives in the «Devices and Drive» section. Click on Local Disk (C:) or the drive which has the Windows icon.

Step 3. Now, click on «Users» to check all user profiles on your system.

Step 4. Right-click on the user profile you want to delete

Step 5. Click on the delete option in the drop-down menu.

delete option

Step 6. Right after this, press the Windows + R key to open the run command window.

Step 7. Now, type «regedit» and click on the «Ok» button.

regedit

Step 8. Copy and paste the following Registry Key into the registry editor.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

copy profile

Step 9. Find and open the «FileList» folder and go to the «ProfileImagePath.»

filelist

Step 10. Right-click on this file and click on the delete option. You’ll get a warning message, but you can proceed by clicking on the «Yes» option.

confirm value delete

Step 11. Close the registry editor and restart your PC. Upon restarting, you won’t see the deleted profile in the «Users» folder anymore.

Step-by-step process to delete a user profile through system properties

Step 1. Open the run command by pressing Windows+R.

Step 2. Type «systempropertiesadvanced» and click «Ok.»

system properties

Step 3. Now, open the «Advanced» tab from the top menu.

advanced

Step 4. Click on the Settings button inside the «User profile» option.

settings

Step 5. A new User Profiles window will appear. Now, select the profile you want to delete and hit the «Delete button». Click «Yes» when a new window appears for final confirmation. Upon restraining the PC, the deleted profile will no longer appear.

delete profile

Step-by-step process to delete a user profile from the settings app

Step 1. Type «Settings» in the search bar to open the application.

Step 2. Click on «Accounts» and then open «Family & other users.»

Step 3. Now select the profile you want to delete and remove it.

settings remove

Besides, you may as well choose to copy and transfer user profile.

Bottom Line

A user profile is a great way to keep your data safe and separate from unauthorized access if you share your PC with your family or colleagues. Sometimes, you wish to delete a user profile you have created due to any reason. This article has presented two authentic ways of deleting a user profile from Windows 10.

Столкнулся с проблемой — глюканул профиль пользователя: винда стала требовать пароль, при этом, пароля там не было. Сброс пароля с помощью net user ни к чему не приводил. В учетных записях (netplwiz) пользователь не отображался, однако в реестре профиль был, команда net users его показывала.
Поскольку, там ничего ценного не было, то решил удалить его и создать другой.
В командной строке ввел net user profile_name /delete — сообщение, что команда выполнена.
Перезагрузил, в командной строке net users — профиль на месте.
net user profile_name /delete выдает ошибку, что профиля нет.
net user profile_name /add выдает ошибку, что профиль есть.
В общем, профиль Шредингера.
При этом, не работает ПУ — Учетные записи пользователей — Изменение типа… и ПУ — Учетные записи пользователей — Удаление… не открываются.
В реестре, в ветке HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList раздел профиля удалил.
ОС Win10 Home
Собственно, вопрос: как удалить профиль не переустанавливая системы?


  • Вопрос задан

  • 1891 просмотр

Being able to add different user profiles is an outstanding security feature in Windows system. If the computer is being used by different users, you can easily protect one’s data from other users. But at some point, you will have to delete the user profile Windows 10. Well, there can be many reasons why a user profile needs to be deleted, including:

  • You need to remove a specific user and their access from your laptop or PC.
  • The user profile needs to be deleted due to a forgotten password.
  • The user is no longer allowed to access the files and folders on the computer.

Part 1. User Account VS User Profile

A user account is a profile that belongs to one specific user. It provides basic access to the files and folders of this specific user. It has different levels of permissions, depending on how much you trust the user. A user account is created by default when you install Windows system.

A user profile, on the other side, is not associated with any user; it enables other users to log on to your laptop or PC without needing your permission. A user profile consists of different settings like wallpaper, screen saver, and many other features that are associated with the personal requirements and choices of a user. Can Windows 10 delete user profiles just like user accounts? You will get the answer to your queries in the next sections.

Once you know the differences between a user profile and a user account, you can clearly make the decision whether you need to delete the user account or user profile. When it comes to deleting the user profile, users need to understand they can still use the account password and login details to access the system, but all the folders and the files will be erased that are associated with the user profile.

On the other hand, deleting the user account will not alter the files and folders, but it will remove the login credentials like password and username.

To perform the user profile deletion, the user needs to have administrative rights. Here are some ways how to delete user profile Windows 10. First of all, we will discuss the situation when you have administrative access to the computer.

Way 1: Delete user profile registry

Deleting Windows 10 user profile from the registry is a viable solution, and this method works in most cases. Let’s see how this method works by following the given steps.

  • Go to C:\Users and then choose the user profile that you want to delete and press the delete button.
  • delete user profile windows 10

  • Confirm the deletion by pressing continue on the popped up window.
  • Type “Regedit” in the search bar of Windows and run as administrator.
  • You can find the profile list by navigating the open window, and here is the pathway for that:
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\ProfileList

  • You can find the required user profile by clicking on the SID and then checking the Data field next to “ProfileImagePath.”
  • Once you have confirmed the user SID, simply delete the user profile from the left pane.
  • delete user profile windows 10 registry

  • Confirm the deletion of the user profile, and you are done with the process.

delete user profile windows 10 registry

Way 2: Delete user profile command line

Not everyone knows how to use the command line, but sometimes this method can save you from bigger troubles. Follow the given steps to delete the user profile Windows 10 command line:

  • Open CMD and type “net users” to get the list of all available user profiles.
  • Now, choose the user that you want to delete and enter “net user “user profile name” /delete.”
  • If the above command does not work, you can try “net user “user profile name” /delete /domain.”

All the data associated with this user profile will be deleted after this command, so it is better to create a backup of your important files before this process.

Way 3: Delete user profile PowerShell

Using the PowerShell tool, user profiles can be deleted remotely, but this process is a little bit complicated; here is the process that you need to follow to perform this action.

  • Use to given script to calculate the size of users in the drive:
  • gci -force ‘C:\Users’-ErrorAction SilentlyContinue | ? { $_ -is [io.directoryinfo] } | % {
    $len = 0
    gci -recurse -force $_.fullname -ErrorAction SilentlyContinue | % { $len += $_.length }
    $_.fullname, ‘{0:N2} GB’ -f ($len / 1Gb)
    $sum = $sum + $len
    }
    “Total size of profiles”,'{0:N2} GB’ -f ($sum / 1Gb)

    windows 10 user profile deletion

  • Now, list the users that are inactive for more than two months.
  • Get-WMIObject -class Win32_UserProfile | Where {(!$_.Special) -and ($_.ConvertToDateTime($_.LastUseTime) -lt (Get-Date).AddDays(-60))}| Measure-Object

  • Now, enter the all inactive user profiles, use the given command:
  • Get-WMIObject -class Win32_UserProfile | Where {(! $ _. Special) -and (! $ _. Loaded) -and ($ _. ConvertToDateTime ($ _. LastUseTime) -lt (Get-Date) .AddDays (-30))} | Remove-WmiObject –WhatIf

  • If you want to save some specific profiles, then you can modify the command, but it will complicate things for the common user.

Part 3. Delete User Account on Windows 10/11

All of the mentioned methods were applicable when you had administrator access. What if you have forgotten the Windows password Or have no access to admin account and want to delete the user profile? And if you just want to delete the user account? In these situations, you have three options available to get the job done:

  • Reset the admin account password.
  • Remove admin account password.
  • Delete your Windows account.

For these three options, UnlockGo – Windows Password Recovery can help you, as a one-in-all windows password recovery tool that can help you to reset, remove admin account password or delete any user account or profile.

Now, you need to follow these simple steps if you want to learn how to delete a user profile Windows 10. Prepare a bootable USB and another accessible computer, download the program in the computer and create a password reset disk.

Step 1: Create Windows Reset Disk

Whether you want to reset/remove the password or want to delete or add a new account, you need to create the reset USB or disk.

burn usb

Step 2: Enter Boot Menu from Reset USB

Now, insert the burned USB into your locked PC, and choose the boot key to enter BIOS menu, press F12 or ESC for most computer, and if it didn’t work, the chart below you can check.

burn successfully

Surface BIOS Access Tips:Hold the volume-up button. Press and release the power button. When the Surface logo appears, release the volume-up button.

Step 3: Select Boot Device Priority

When you enter the boot menu, using arrow keys to select boot tab, then select boot device priority, and then set your bootable USB, press F10 save and exit.

enter bios menu

Step 4: Reset/Remove Account Password or Delete Windows Account

Here you can first select the windows system version of your locked computer. All the accounts’ names will show up on the screen, choose the admin account name and then click “Reset/Remove Account Password”, then you can directly login to admin account or using new password.

delete windows 10 user profile

Note: Microsoft account can’t be deleted and created, Microsoft account password can be reset.

After this, you have erased the user profile and account from Windows 10 by using UnlockGo for Windows without administrator access.

UnlockGo for Windows as a all-in-one tool, it can delete all windows password, and admin accounts for you, also you can check how to delete administrator account on windows 10 with ease.

Bonus Tips about Deleted User Profile and Account

Here are some amazing tips and insights that you need to know about this topic.

1. How to Recover the Deleted User Profile?

Recovering a deleted user profile is quite easy when you have the backup of the File History. You can restore your files with the File History, and the other manual way is too complicated for a regular Windows user.

2. Can I Recover Deleted User Account?

The answer to this question is quite complicated, but this article by Microsoft Forum may help you to Recover Deleted User Account.

3. How to Change Accounts Type on Windows?

This is only possible if you have administrator privileges. If you have the valid password and user name for login, follow the Change Account Type to find the detailed answer.

Final Verdict

In this article, we discussed how to delete user profiles windows 10 using different methods, and you have learned that it is quite easy when you have administrator privileges. However, if you are unable to login into the system or forgot the password of an admin account, then these methods are useless for you. If this is the case, then we suggest taking advantage of UnlockGo for Windows, which provides a quick and easy way to get rid of locked out Windows accounts and other related problems.

UnlockGo (Windows)

  • Delete or remove user profiles and accounts without a password.
  • Remove account password without administrator access.
  • Create new profiles without losing data within a few clicks.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows не запоминает пароль wifi
  • Энергосберегательный режим windows 10
  • Резервное копирование раздела windows
  • Как удалить программу в windows 10 если ее нет в удалении программ
  • Как посмотреть скольки ядерный процессор на windows 10