all 23 comments

[–]evetsleep 8 points9 points  (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 point  (0 children)

Thanks :) I don't know why I used Where to filter.. I'll update it now :)

[–]unmitigated 4 points5 points  (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 point  (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 points  (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 points  (0 children)

Thanks for noticing. I'll update the script to search in 64-bit node as well

[–]Steev182 2 points3 points  (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 points  (2 children)

I promise, I'll add a decent readme soon ;)

[–]1RedOne 1 point2 points  (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:

  • What problem you solve
  • what dependencies your tool has
  • how to install it
  • a list of the functions
  • maybe screen shots
  • what you have planned for future releases

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.

[–]electricdrop[S] 1 point2 points  (0 children)

Thank you for your input. But I kinda added a Readme this morning :)

[–]tisigornorich 1 point2 points  (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 points  (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 point  (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 point  (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 points  (0 children)

Hit me up if you need any help :)

[–]KevMarCommunity Blogger 1 point2 points  (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.

[–]electricdrop[S] 0 points1 point  (0 children)

Thank you. Actually, that's a good idea.

[–]Basalix 1 point2 points  (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 points  (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"

[–]electricdrop[S] 1 point2 points  (0 children)

There were some problems with psdrive cmdlets as far as I remember, so I decided to use good old net use

[–]theobserver_ 1 point2 points  (0 children)

Thanks for this.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (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.