r/PowerShell • • Jul 23 '19

Use PowerShell delete a user profile (step-by-step guide)

https://adamtheautomator.com/powershell-delete-user-profile/?utm_source=reddit&utm_medium=social&utm_campaign=newblogpostnotifications
120 Upvotes

59 comments sorted by

View all comments

20

u/[deleted] Jul 24 '19

[removed] — view removed comment

5

u/Emiroda Jul 24 '19

As you said, right tool for the job.

So GPO for domain machines you are certain will be reachable, where the GPO fits your needs.

Something else for those that might not be. Non-domain joined DMZ servers, road warrior laptops, etc. I use SCCM to run my PowerShell scripts, either as the new CMScript feature or as CIs.

The only thing you can do entirely wrong is going "this looks nice, I'm going to implement this in production right now". Slow down, see the value being presented, research if there's any alternatives (in this case you'd find the GPO that does this) and then decide what's best in your environment.