PowerShell Modules can be Painful

Building a PowerShell module should not be too hard. In fact, on the surface it’s pretty simple. Collect a bunch of functions, classes, enumerations, (whatever else you want), bundle them together and provide a wrapper in the form of a PSD1/PSM file. Building a module should be straightforward – and it is – except when you make dumb mistakes. Don’t make my mistakes.

Installing Utilities Folder with PowerShell

Just stashing this here in prep for a larger article. As written the above will install the utilities in C:\UTILS. However, some workstations may block these types of installs. In that event, I’ve added a flag ($IsMachine) which can be flipped to False and install in the current user’s profile.

Installing the Latest Notepad++ with PowerShell

I just needed a place to stash this and my GitHub didn’t seem appropriate. I make no guarantees that this will work and it’s only been tested on one system so far. I added the -Unique flag to the end of the download URL detection as indicated in a below message. (Again, nice catch!)

Building my Orion Server [Scripting Edition] – Step 3.1

Let’s forget all about my previous step 3. For the sake of argument, step 3 is dead, long live step 3.1!  Any script should be a living, breathing document which gets updated as needed.  In this case, it was needed.  Why would I burn such a good script to the ground?  Well, to be blunt, I’ve found a better way to do this, with better ultimate performance.

If you need a refresher on the previous steps, I have Step 1 for Hyper-V, Step 1 for VMware, and Step 2.

Read more