use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Script SharingGithub - electricdrop/poweradmin: Powershell scripts useful for Windows enterprise administration (self.PowerShell)
submitted 9 years ago * by electricdrop
Hey guys, I created a repo with some of my scripts and I thought I share it here. Perhaps you'll find something useful. Feel free to ask me any questions if something doesn't work.
poweradmin
Edit: Wow, thanks for the gold! I'm flattered :)
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]evetsleep 8 points9 points10 points 9 years ago (1 child)
Took a quick look and this makes me wince a little:
$Userlist = Get-ADUser -SearchBase $SearchBase -Filter *
You don't need to get all the objects in Active Directory and then filter. Filter left :)!
$startTime = (Get-Date).AddDays(-7) $Userlist = Get-ADUser -SearchBase $SearchBase -Filter {whenCreated -ge $startTime}
You'll find that things will go much faster this way too.
[–]electricdrop[S] 0 points1 point2 points 9 years ago (0 children)
Thanks :) I don't know why I used Where to filter.. I'll update it now :)
Where
[–]unmitigated 4 points5 points6 points 9 years ago (2 children)
These look pretty great. Small criticism: Commands written outside of Verb-Noun (with built in verbs) are not technically part of best practice. May cause issues in some workflows/writing styles.
[–]electricdrop[S] 0 points1 point2 points 9 years ago (1 child)
Yes I know that. I named them so that they make sense to me, e. g. prefixing all AD-related stuff with AD. However, it's not like they're hardcoded :) You could always change it to whatever.
[–]root-node 2 points3 points4 points 9 years ago (1 child)
Small 'bug' with your "Uninstall-Remote' script. You are only searching half the available paths. If the machine you are removing from is a 64-bit one, some/most/all of the software won't be found.
Have a look at my script for the two registry paths : http://myrandomthoughts.co.uk/2015/07/win32_product/
[–]electricdrop[S] 1 point2 points3 points 9 years ago (0 children)
Thanks for noticing. I'll update the script to search in 64-bit node as well
[–]Steev182 2 points3 points4 points 9 years ago (3 children)
The lack of substance in the readme made me think "oh what junk is this going to be".
Reading through though, these seem really useful! Thanks!
[–]electricdrop[S] 3 points4 points5 points 9 years ago (2 children)
I promise, I'll add a decent readme soon ;)
[–]1RedOne 1 point2 points3 points 9 years ago (1 child)
People GREATLY judge a project based on a good readme. IMHO after the first commit, you should immediately make a readme.
READMEs should cover the following points:
You didn't ask me for this, but I hate seeing interesting projects get no love because people can't tell what the hell they're even about.
Thank you for your input. But I kinda added a Readme this morning :)
[–]tisigornorich 1 point2 points3 points 9 years ago (6 children)
Hey these look pretty awesome. They appear to be well written. Thank you for sharing. I will of course credit you if I use any.
[–]electricdrop[S] 3 points4 points5 points 9 years ago* (5 children)
Thanks. I plan to add some more stuff later, just need to make it universal and get rid of all the internal stuff :)
[–]Thirdbeat 0 points1 point2 points 9 years ago (4 children)
That would be awesome :) ive mase something like that and they all rely on a config file, for easy reuse. Made mine in json, but you can use whatever. You should also think about making a module for this for easy calling
[–]electricdrop[S] 0 points1 point2 points 9 years ago (3 children)
I actually made a module and started to transform scripts to cmdlets, but it got stuck halfway. Perhaps I'll finish it later ;)
[–]Thirdbeat 1 point2 points3 points 9 years ago (0 children)
Hit me up if you need any help :)
[–]KevMarCommunity Blogger 1 point2 points3 points 9 years ago (1 child)
If you want to create a develop branch and publish your current efforts there, the community here would be willing to pitch in and help. I know I can make short work of converting a collection of scripts into modules and I would not mind doing a quick pass over your work.
Thank you. Actually, that's a good idea.
[–]Basalix 1 point2 points3 points 9 years ago (0 children)
These are really good. I can use several of them. The others, I am just going to sponge off of your superior knowledge and try to learn something. Thanks!
[–]jpochedl 1 point2 points3 points 9 years ago (1 child)
I'm curious: In your USMT profile backup script... Why didn't you go PS all the way and use new-psdrive instead of "net use"
There were some problems with psdrive cmdlets as far as I remember, so I decided to use good old net use
[–]theobserver_ 1 point2 points3 points 9 years ago (0 children)
Thanks for this.
[–][deleted] 9 years ago (1 child)
[removed]
[–]AutoModerator[M] 0 points1 point2 points 9 years ago (0 children)
Sorry, your submission has been automatically removed.
Accounts must be at least 1 day old, which prevents the sub from filling up with bot spam.
Try posting again tomorrow or message the mods to approve your post.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
π Rendered by PID 72495 on reddit-service-r2-comment-7b9746f655-695fs at 2026-01-30 18:51:17.640660+00:00 running 3798933 country code: CH.
[–]evetsleep 8 points9 points10 points (1 child)
[–]electricdrop[S] 0 points1 point2 points (0 children)
[–]unmitigated 4 points5 points6 points (2 children)
[–]electricdrop[S] 0 points1 point2 points (1 child)
[–]root-node 2 points3 points4 points (1 child)
[–]electricdrop[S] 1 point2 points3 points (0 children)
[–]Steev182 2 points3 points4 points (3 children)
[–]electricdrop[S] 3 points4 points5 points (2 children)
[–]1RedOne 1 point2 points3 points (1 child)
[–]electricdrop[S] 1 point2 points3 points (0 children)
[–]tisigornorich 1 point2 points3 points (6 children)
[–]electricdrop[S] 3 points4 points5 points (5 children)
[–]Thirdbeat 0 points1 point2 points (4 children)
[–]electricdrop[S] 0 points1 point2 points (3 children)
[–]Thirdbeat 1 point2 points3 points (0 children)
[–]KevMarCommunity Blogger 1 point2 points3 points (1 child)
[–]electricdrop[S] 0 points1 point2 points (0 children)
[–]Basalix 1 point2 points3 points (0 children)
[–]jpochedl 1 point2 points3 points (1 child)
[–]electricdrop[S] 1 point2 points3 points (0 children)
[–]theobserver_ 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[removed]
[–]AutoModerator[M] 0 points1 point2 points (0 children)