---
title: Deleting Intune Users (Because I forgot about the registry)
date: 2025-03-25T12:51:26+00:00
draft: false
tags:
  - windows
  - sysadmin
  - intune
---
So, you ran out of space on an Intune managed device.
Like mine, your first inclination may be to delete the user folders in the c:\users directory via booting into a USB drive. However, this will break those deleted users when they try to sign in again, instead logging them into a temporary account.
When running CMD, your user profile location seems to be `C:\Users\YOURDOMAIN.TEMP` but `whoami` returns `yourdomain\user`. Hmm.

The solution? Delete the users from the registry too, else Windows will complain.

Go to regedit from a local account (or from a recovery USB importing the hive):
`HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList`

Then delete all the Intune users whose folders you deleted. These will probably begin with `S-1-12-1`. Be careful not to delete the folder or the registry entry of the user who enrolled the computer, otherwise bad things may happen - I don't know but I suspect that user disappearing may be a problem for how Intune works.

Log out, reboot, and it should work.