Skip to content

aces4all00/DeleteUserProfile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub
GitHub release (latest SemVer) Last release GitHub last commit
PSGallery downloads

DeleteUserProfile

This module will let you show all of the user profiles that are saved on a local or remote computer, you can also delete one specific user profile or all of the profiles.
You can also return the user profiles from multiple computers at the same time.
The special windows profiles are excluded.

I have added the result from PSScriptAnalyzer in test folder

This module will do the following

  • Return all of the user profiles from a remote or local computer
  • Delete one specific user profile or all of the user profiles from a local or remote computer
  • Delete all user profiles from both local and remote computer
  • You can exclude user profiles to show
  • You can exclude user profile to be deleted
  • If the user profile are loaded it will not get deleted
  • The special windows profiles are excluded

If you use this module on a remote computer you need to make sure that you have WinRM activated.

Links

Help

Below I have specified things that I think will help people with this module.
You can also see the API for each function in the help folder

Install

Install for current user

Install-Module -Name DeleteUserProfile -Scope CurrentUser -Force

Install for all users

Install-Module -Name DeleteUserProfile -Scope AllUsers -Force

Example

Get-RSUserProfile

If you want to use this on a remote computer just add the parameter -ComputerName <COMPUTERNAME> in the commands below.

Get-RSUserProfile

Return all user profiles that are saved on the local computer

Get-RSUserProfile -Exclude "Frank", "rstolpe"

This will return all of the user profiles saved on the local machine except user profiles that are named Frank and rstolpe

Get-RSUserProfile -ComputerName "Win11-Test", "Win10"

This will return all of the user profiles saved on the remote computers named Win11-Test and Win10

Remove-RSUserProfile

If you want to use this on a remote computer just add the parameter -ComputerName <COMPUTERNAME> in the commands below.

Remove-RSUserProfile -DeleteAll

This will delete all of the user profiles from the localhost / computer your running the module from.

Remove-RSUserProfile -Exclude "User1", "User2" -DeleteAll

This will delete all of the user profiles except user profile User1 and User2 on the local computer

Remove-RSUserProfile -Delete "User1", "User2"

This will delete only user profile "User1" and "User2" from the local computer where you run the script from.

About

This module will let you show all of the user profiles that are saved on a local or remote computer, you can also delete one specific user profile or all of the profiles. You can also return the user profiles from multiple computers at the same time.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PowerShell 100.0%