September 23, 2016 at 5:33 pm #54551
We are looking to start using a number of various Custom PowerShell Modules in our business, some of which will be using during PS Remoting.
For this reason, I thought that it would be more efficient and convenient to have these custom modules deployed to "C:\Program Files\WindowsPowerShell\Modules" for quick use during Invoke-command and PS Remoting sessions.
I know that this can be easily achieved via Group Policy and the Replace File option or similar, but I don't think that this would be very efficient
The other option would be to possibly use a logon script to check if the files differ and update them – again, I wasn't sure if this would be practical.
Does anyone have any suggestions how we can deploy Custom PowerShell Modules centrally and keep them up-to-date in a timely manner with minimal administrative overhead?
My guess is that in the early days, we might update them to LIVE a couple times a week or month it would be great to barley worry about them and still have consistent functionality on each machine.
Any suggestions are greatly appreciated (my best is a logon script that checks to see if the modules have been modified)
September 23, 2016 at 5:36 pm #54552
The best approach would be to ensure you've deployed PowerShell Package Manager and PowerShellGet, and then set up a private PowerShell Gallery. Nodes can then use Install-Module and Update-Module (which can be run whenever you feel it's needed) to pull modules down from your gallery. For example, scripts might proactively check for their dependencies as a first step, pull down whatever is needed, etc.
Obviously, DSC is another way to declare which modules a node should have, and to ensure they have the latest version.
September 23, 2016 at 5:37 pm #54553
But to more strongly make a point – I don't think logon scripts are a good approach. You'll be forever maintaining that script. Each script should check its own dependencies, which becomes a way of documenting, in the script, which modules the script depends on.
October 9, 2016 at 3:17 pm #55122
Thank you very much for your suggestions, I think these could be a great choice when we get up to Version 5.0
Do you know of any enterprise level & supported products to use for a private PowerShell Gallery?
I can see that PSPrivateGallery and NuGet are popular, but without a paid and supported version, it could be hard to authorisation to get this into production.
October 9, 2016 at 4:13 pm #55123
Nope. Those are all open source technologies; I'm not aware of anyone marketing a paid version.
October 9, 2016 at 4:31 pm #55124
Appreciate your help!
October 13, 2016 at 11:33 am #55269
All you need is a NuGet feed, there are a number of companies that offer paid versions. We use Artifactory in our enterprise which can do it.
You must be logged in to reply to this topic.