How do you manage your powershell script library?

I am just starting to build a whole lot of scripts but I don’t think I am organising them properly/efficiently.

I was just wondering how you guys organise your scripts (folder structure wise) before you put them into modules for final use so I can pick up some ideas.

Thank you in advance.

I have a folder called scripting. Under that folder I have two other folders called vbscript and one the PowerShell. In the PowerShell folder, I create subfolder and the folder name depends on what I am working with. Ex. AD,Sccm,Gpo

Efficient methods really depend on the person and environment. Personally most of my scripts are pretty short so I have “Testing” and “Archive” folders for WIPs and finished scripts respectively, and I just give them descriptive names.

Currently I can find everything I’m looking for easily but when the library expands to the point this is less easy I can use Get-ChildItem | Where Name -like “keyword” - To go a step further I use Get-Content and search the scripts themselves. Could even add these to a module so you only need to type Get-Script “keyword” or something and have a switch to open results in the ISE.

If you have several categories you may wish to split them into subfolders but for me this would only confuse things as my categories would need to be so specific I’d find scripts applying to more than one, so again it depends on what you’re doing and how you like working.

yup I just dump them into one big folder called scripts. then get-child-item bla bla -recurse | ?{$_ -like “kittens with bow ties”}

folders for each company I work for. Under that folders by project, folder for oneoff scripts I’ve written for other people, folder for reports.

for gui’s I write, I use sapien which organizes them into projects and files. It also has a start tab that lists all the recent scripts.