Sometimes you need to remove user profiles from Windows, with this module you can do it in a easy way both from the local computer and from a remote computer.
I have updated my one year old module that removes user profiles in an easy way from Windows today. And now it’s even faster!
I will explain how it works soon but first I just want to tell you what’s been updated in the module.
- I have added threaded job to it so now it’s even faster!
- Added better error handling
You need to install the module before using it, read more how to do that from the GitHub page
It’s really easy to just get all user profiles from your local computer or remote computer.
If you skip -ComputerName
parameter it will run it on your local computer and it will exclude special profiles.
To get all user profiles from a remote computer we can execute this
Get-RSUserProfile -ComputerName "win11-client01.lan.stolpe.io"
Now let us remove a user profile from this computer
Remove-RSUserProfile -ComputerName "win11-client01.lan.stolpe.io" -UserName "test_user01"
If we try to remove a user profile that are either loaded or don’t exists we will get a notification about that.
We also have the option to delete multiple user profiles at the same time.
Remove-RSUserProfile -ComputerName "win11-client01.lan.stolpe.io" -UserName "test_user01", "Administrator"
To make life even easier we can actuelly delete all user profiles from a computer and exclude the user profiles we don’t want to delete.
Remove-RSUserProfile -ComputerName "win11-client01.lan.stolpe.io" -Exclude "robin" -All
And we can of course also delete all of the user profiles.
Remove-RSUserProfile -ComputerName "win11-client01.lan.stolpe.io" -All
I’m hoping this module will help some of you and make your life a little easier!
Happy to stumble across the DeleteUserProfile module, installed and testing. Is the exclusion parameter still valid? I’m getting “A parameter cannot be found that matches parameter name ‘Exclude’.”
It’s a bug, I’ll fix it on my lunch break today and update the module.
Hi,
I have added a pre-release now that should work. Please try it out.
To install it uninstall the old module first.
Uninstall-Module -Name "DeleteUserProfile" -Force
Then install the dependency module, it’s req for the new version.
Install-Module -Name "rsServiceModule" -Scope AllUsers -Force
Then install the pre-release module
Install-Module -Name "DeleteUserProfile" -Scope AllUsers -AllowPrerelease -Force