# Remove Multiple Local User Profiles

**URL:** <https://forums.powershell.org/t/remove-multiple-local-user-profiles/8491>\
**Category:** PowerShell Help\
**Created:** [April 23, 2017, 12:18pm UTC](https://forums.powershell.org/t/remove-multiple-local-user-profiles/8491 "2017-04-23T12:18:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikemckay](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mikemckay](https://forums.powershell.org/u/mikemckay)\
**Post date:** [April 23, 2017, 12:18pm UTC](https://forums.powershell.org/t/remove-multiple-local-user-profiles/8491/1 "2017-04-23T12:18:40Z")

</div>

Good Day  
I have found some great code which great to remove user profiles and reg edit entries for one user at a time. But I have a few workstations that are common use ones. Some have up to 160 profiles on the workstation. What could be added to the script to delete all user profiles? The command i use is C:\Script\RemoveLocalUserProfile.ps1 -DeleteUnusedDay 30 -ExcludedUsers “Administrator”

I am very new to Powershell and have been tasked with this, to clean up these workstations/laptop this way. Instead of reimaging of the workstations.

If someone can point me in the right direction, any help would be greatly appreciated.

Thanks

Mike

The code is located - [Here](https://gist.github.com/anonymous/cc1726e30553477591cb07e37c9c40cd)

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [April 24, 2017, 12:27am UTC](https://forums.powershell.org/t/remove-multiple-local-user-profiles/8491/2 "2017-04-24T00:27:30Z")

</div>

I’ve been told that [DelProf](https://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/) is one of the easiest solutions for these kind of tasks.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:38pm UTC](https://forums.powershell.org/t/remove-multiple-local-user-profiles/8491/3 "2024-05-16T20:38:52Z")

</div>


