How do you organize your PowerShell Universal environment?

I’m looking for suggestions on how others have set up PSU in their enterprise environment. I thought I’d ask the braintrust before we re-invent the wheel as we drive over speedbumps. :slight_smile:

I’m happy to go off and do all the leg work if anyone just wants to throw some URLs at me.

Here are our main goals:
Our network side has some fledging engineers and we have lots of PS scripts around, many that need to be cleaned up. They are run on demand, some triggered via scheduled tasks, some launched form other processes (i.e. SSIS, network monitoring or ITSM tools), etc.

My background is as a developer (not really PowerShell) and we’re looking to really clean up our methods and environment. We went searching for an environment we could put all this in. Originally looked at RunDeck but it just took way to long to learn and spin up and the upfront financial cost is prohibitive. Found PowerShell Universal and loving the concept so far.

We have functions like username generators per our business rules or Zoom account licensing, etc. that we would love to add an API to. Much of the more complex code is in larger scripts.

We would love to refactor out the various functions into a library to reduce complexity and share among the team. We could use them in automation scripts, put them behind an API that our various systems might us and access them on demand from a dashboard accessible by our help desk staff.

Thinking the following:

  • It would be best if we organized them into our own company module(s)
  • Would then import these into PSU (through a new environment?)
  • Reference them them in the larger Scripts
  • Wrap them in simple API’s to be called by our various tools (or even Azure Functions)
  • wrap them in simple Dashboard components for our help desk

Anyone willing to share what they do?

Product: PowerShell Universal
Version: 1.5.14
1 Like

Honestly you’re pretty much describing what I’m currently building - to some extent.

Given that not all machines are always accessible via PSRemoting, not all of this is centralized. But given the enterprise licensing, we’re okay spinning up multiple instances. We’re also working on using PSU to replace VisualCron, and migrate our DevOps automations out of Octopus Deploy.

I have some pretty complex usage scenarios I’d be happy to share. Though I’ve not had time to generalize what I have (partially because they’re still WIP), I could go into some pretty great detail explaining how I’ve done what I’ve done, and provide examples.

1 Like