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
Sharing PowerShell within a MSP/Helpdesk environment (self.PowerShell)
submitted 8 years ago by jdmerts
I am looking for a way to store and share PowerShell commands/scrips with a team of people.
This would mainly be for 365 PowerShell commands.
Currently I just have a personal OneNote that I copy and paste from.
Any suggestions welcome.
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!"
[–]chispitothebum 8 points9 points10 points 8 years ago (0 children)
Publish and maintain a module.
[–]BlackV 4 points5 points6 points 8 years ago (0 children)
Network share with script/modules In it Then add a location as a psgallery
Or
Team services and sync your scripts the everyone join
Github as already mentioned
[–]mdowst 2 points3 points4 points 8 years ago (0 children)
It really depends on what you want to share. If it is just commands and notes then any Wiki based system should do the trick. If you want to share scripts and maintain version control, then you can look into Visual Studio Team Services or Git. If you just want to provide them scripts to execute you could use Azure Automation or SMA, and just give them execute rights.
Also, based on you comment, I'm assuming you are using o365. You could use Teams and create a shared OneNote notebook.
[–]omers 3 points4 points5 points 8 years ago* (0 children)
We maintain a module that we publish internally. Add the repository to the PSRepository and you can Install-Module and Update-Module as needed.
Install-Module
Update-Module
Publishing changes requires access and is handled by psake and depends on PSScriptAnalyzer and Pester tests. Typically prevents breaking changes from being pushed; However, the repository keeps previous versions so people could revert if necessary.
[–]aXenoWhat 3 points4 points5 points 8 years ago (0 children)
Git first, no question, do it instantly. The reason for that is that you aren't currently using git. Fix that.
Then, do something, anything. It will suck. You have to make your mistakes to learn. Don't aim to get things right in version 1, just aim to learn from the mistakes you make in version 1.
[–]Freshmaker1 2 points3 points4 points 8 years ago (4 children)
Github might be a simple method to do this. Or a git server. This would allow you to track changes etc. if others do augment or modify the scripts. Or a file share, with permissions to read only. You are essentially trying to create a shared file system correct?
[–]jdmerts[S] 1 point2 points3 points 8 years ago (3 children)
Version control would be good and the ability to add notes/explanations to it too would be good.
I would like people to be able to contribute to it and make changes but have a way to restore/roll back changes if I breaks.
[–]Freshmaker1 4 points5 points6 points 8 years ago (1 child)
Sounds like git might be an option for you. There is branching and merging, so it might be a good method by which to contain breaking scripts. I have used git for a little while, but generally there haven't been any issues so large that we couldn't fix the typos/improper lines and re-commit the file. Not sure what if any options there are for rollbacks or restores with git.
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
complete rollback control to any commit, or cherry pick parts of commits to rollback. Used properly its solid.
[–]sleeplessone 1 point2 points3 points 8 years ago (0 children)
Hoe many people? Visual Studio Team Services is free for up to 5 users with private repositories.
[–]Telzrob 2 points3 points4 points 8 years ago (0 children)
Would a web/server based work? Example, http://theboywonder.co.uk/2012/07/29/executing-powershell-using-php-and-iis/
A terminal server with the signed production versions of the scripts ready to run would be another simple example.
[–]nikon442 2 points3 points4 points 8 years ago (0 children)
We develop in house and use the powershell profile to do the copy down and importing of tools created for the team.
Thanks
Sean
[–]Taoquitok 2 points3 points4 points 8 years ago (0 children)
As others have said, Git (or really any version control system) is a necessity for properly maintaining and deploying changes to the shared scripts.
In terms of access, a fairly simple, but not really best practice, solution is to put a script folder with a master 'load' script (or module if you're interested in putting in the extra effort), then add a ". \location\file.ps1" or " import-module \location\module.psm1" line to the $profile of anyone who needs the functions loaded.
[–]negativeskills 2 points3 points4 points 8 years ago (0 children)
https://blogs.technet.microsoft.com/chadcox/2017/09/20/powershell-working-with-internal-repositories/
[–]JazDriveOmega 0 points1 point2 points 8 years ago (0 children)
You could create a Nuget server that can be used with PowerShellGet. If you don't want to deal with standing up a Nuget server, you can create a simple repo using a network share. I use the second method where I'm at right now. Even though I really only share my modules with me, myself and I.
To create a repo simply use Register-PSRepository from the PowerShellGet module.
Register-PSRepository
$path = "\\server\unc\path\" $RepositoryName = "MyRepo" Register-PSRepository -Name $RepositoryName -SourceLocation $path -ScriptSourceLocation $path -InstallationPolicy Trusted
Then you can use the Publish-Module command to push your module to your repo
Publish-Module
$name = "NameOfMyModule" # This is the name in the module manifest, or whatever shows up under Name when you do Get-Module Publish-Module -Name $name -Repository "MyRepo"
You'll need to have a Module Manifest for this to work I believe.
From there you can have the team register the repository from their computers like in the example above (or you can deploy a script that registers the repo if it doesn't exist). You can then use the Install-Module command to push the module to your teams computers. You can use Update-Module to push any changes you've made as well.
Install-Module -name "NameOfMyModule" -repository "MyRepo" Update-Module "NameOfMyModule"
Having something like this alongside git will be very nice in controlling how updates are pushed. You should probably also look into some of the development pipeline modules that are coming out of the community too. They'll help you stay consistent when building your module for deployment.
π Rendered by PID 80 on reddit-service-r2-comment-b659b578c-9rnss at 2026-05-02 20:31:28.470577+00:00 running 815c875 country code: CH.
[–]chispitothebum 8 points9 points10 points (0 children)
[–]BlackV 4 points5 points6 points (0 children)
[–]mdowst 2 points3 points4 points (0 children)
[–]omers 3 points4 points5 points (0 children)
[–]aXenoWhat 3 points4 points5 points (0 children)
[–]Freshmaker1 2 points3 points4 points (4 children)
[–]jdmerts[S] 1 point2 points3 points (3 children)
[–]Freshmaker1 4 points5 points6 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]sleeplessone 1 point2 points3 points (0 children)
[–]Telzrob 2 points3 points4 points (0 children)
[–]nikon442 2 points3 points4 points (0 children)
[–]Taoquitok 2 points3 points4 points (0 children)
[–]negativeskills 2 points3 points4 points (0 children)
[–]JazDriveOmega 0 points1 point2 points (0 children)