Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Examples of configuring PowerShell on a fresh server (win 2019 or 2022)
-
Hi,
I'm looking to use Otter to setup a fresh server and make sure PowerShell in general, and some specific modules I'm using are installed.
Do you by any chance have basic example of such a task? For example how to check if PSGallery is trusted so I don't get:

I would probalby also need to set the Set-ExecutionPolicy, and I guess I might forget a lot of stuff here as well :-)
Thanks,
Justin -
Make a role with this desired configuration
Ensure-PsRepository ( Exists: true, InstallationPolicy: trusted, SourceLocation: https://www.powershellgallery.com/api/v2, Name: PSGallery );Assign the role to the server
RemediateEt voilà

This should workCheers
PhilippeC. -
For the modules, 2 ways
-
Create a second role which depend on the previous one and use
Ensure-psmodule function to add the required module -
You don t need the set psgallery to be trusted if you use the Force in the Ensure-psmodule
Cf https://docs.inedo.com/docs/otter-reference-operations-powershell-ensure-powershell-module
-
-
This post is deleted!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login