How do you manage your powershell script library?

Welcome Forums General PowerShell Q&A How do you manage your powershell script library?

Viewing 4 reply threads
  • Author
    Posts
    • #33570
      Participant
      Topics: 62
      Replies: 91
      Points: 64
      Rank: Member

      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.

    • #33571
      Participant
      Topics: 16
      Replies: 108
      Points: 0
      Rank: Member

      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

    • #33578
      Participant
      Topics: 7
      Replies: 20
      Points: 1
      Rank: Member

      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.

    • #33584
      Participant
      Topics: 10
      Replies: 122
      Points: 2
      Rank: Member

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

    • #33586
      Participant
      Topics: 1
      Replies: 28
      Points: 0
      Rank: Member

      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.

Viewing 4 reply threads
  • The topic ‘How do you manage your powershell script library?’ is closed to new replies.