Deploy an Enterprise Grade Network in the Home for Less than $500

Last month I decided to embark on a networking project to rid my home of poor connectivity. I tweeted out asking about the benefits of Cat 6 cable since I already owned enough Cat 5e to complete the entire project. The primary benefit of Cat 6 cable for a home environment seems to be future proofing since Cat 5e is perfectly capable of Gigabit. Ultimately, the free Cat 5e cable won out because it left more money in the budget for new networking equipment. If I had to pay someone to install Read more [...]

Use PowerShell to Install the Remote Server Administration Tools (RSAT) on Windows 10 version 1809

My computer recently updated to Windows 10 version 1809 and as with all previous major updates of Windows 10, this wipes out the Remote Server Administration Tools (RSAT). However, unlike previous versions, Microsoft has now made RSAT available via Features on Demand and while you're supposed to be able to install them from the GUI, they never showed up as being an option for me. That's not really a problem though since they can now be installed via PowerShell. Who needs a GUI anyway? The Read more [...]

Learning about the PowerShell Abstract Syntax Tree (AST)

This week, I'll continue where I left off in my previous blog article "PowerShell Script Module Design Philosophy". Moving forward, the development versions of my PowerShell script modules will use a non-monolithic design where each function is dot-sourced from the PSM1 file. When I move them to production, I'll convert them to using a monolithic design where all functions reside in the PSM1 file. In development, each PS1 file uses a Requires statement which specifies the requirements from a PowerShell Read more [...]

PowerShell Script Module Design Philosophy

Years ago, when I first learned how to create PowerShell script modules, I built them with all the functions in one huge monolithic PSM1 file. I like the monolithic script module design from a performance and security standpoint along with the ease of signing fewer files if you’re taking advantage of code signing to digitally sign your scripts and modules (there are fewer files to sign). What I don’t like is that collaborating with others using one huge file is a merge conflict waiting for a Read more [...]

PowerShell Script Module Design: Don’t Use Asterisks (*) in your Module Manifest

Using asterisks (*) in your module manifest is a bad idea no matter how you look at it. First, your module will be slower because it will have to figure out what to export. More importantly, if you use a "#Requires -Modules" statement in your functions and they're in separate PS1 files, all of the specified module's commands will show as being part of your module. I'll pick up where I left off in one of my previous blog articles "PowerShell Script Module Design: Plaster Template for Creating Modules". Read more [...]

Indentation and Formatting Style for PowerShell Code

My preferred indentation style when writing PowerShell code is Stroustrup style because I don't like my code to cuddle (there's no cuddled else in Stroustrup style). I occasionally hear from others that they don't like this style because it doesn't work from the PowerShell console. While it doesn't work by default, there's a trick to making that style work from the PowerShell console. Simply press Shift+Enter instead of just Enter at the end of the line before Read more [...]

PowerShell Script Module Design: Plaster Template for Creating Modules

I recently began updating my PowerShell script module build process. Updating my Plaster template was one of the first things I needed to do. If you haven't already read my blog article about "Using Plaster to create a PowerShell Script Module template", I'd recommend beginning there as this blog article assumes you already have a basic understanding of how to use Plaster. All of the information from my previous Plaster template is still there with the exception of the required PowerShell version Read more [...]

The PowerShell Conference Book – It’s a Wrap!

First, I'd recommend reading my blog article "Announcing the PowerShell Conference Book" if you haven't. In early May of this year (2018), I came up with the idea of what would become "The PowerShell Conference Book". On the evening of May 6th, I sent an email to Don Jones and Jeff Hicks asking what they thought and if they'd be interested in writing a chapter in the book. The next morning, I'd received positive responses from both of them, confirming that they would be interested in participating. Leanpub Read more [...]

PowerShell Script Module Design: Public/Private versus Functions/Internal folders for Functions

There's been a lot of debate about script module design as of lately and instead of tweeting something out asking for responses, I thought I would post it here via a blog article. Back when I first started creating PowerShell script modules, I placed all of my functions in the PSM1 file and later started placing each function in a separate PS1 file that was dot-sourced from the PSM1 file. I would simply place the PS1 files in the root folder of the script module. Read more [...]

Determine the Day of the Week in 11 Days from Now with PowerShell

A couple of days ago, one of my kids asked me "What day of the week will it be in 11 days from now?". My response was "I'm not sure, but I can tell you how to figure out the answer for yourself". Open up PowerShell, wrap Get-Date in parentheses, place a dot or period afterwards, followed by AddDays,  then 11 in another set of parentheses, and finally another dot or period followed by DayOfWeek. Want to know what the day of the week was 11 days ago instead? Read more [...]

PowerShell Saturday Chattanooga Post-Mortem

PowerShell Saturday Chattanooga was this past weekend. I attended the all-day preconference presented by Jeff Hicks on Friday which saw a great turn out of about 50 people or so. I presented two 45-minute sessions as part of the Saturday event. One on "Writing award winning PowerShell functions and script modules" and another on "Recreate MOF based DSC resources as Class based DSC resources". The code and slide decks from both of my presentations can be found in my presentations repo on GitHub. Read more [...]

Named One of the Top 21 SysAdmin Influencers, Bloggers and Geeks to Follow

I was recently named as one of the top 21 SysAdmin influencers, bloggers, and geeks to follow on this years' SysAdmin Day by IT Chronicles. I'm humbled and honored to be part of their list. There are also several other Microsoft Cloud and Datacenter Management MVP's for Windows PowerShell on the list. If your interested in PowerShell (and you probably are if you're reading this blog site), I'd recommend taking a look at the original article on the IT Chronicles website. µ Read more [...]

Determine if a Mailbox is On-Premises or in Office 365 with PowerShell

One of the companies that I support is currently in the process of migrating from an on-premises Exchange Server environment to Office 365. They're currently running in hybrid mode. While it seems like wanting to know what mailboxes still exist onsite versus which ones are in the cloud would be an all too common task, there doesn't seem to be an easy way to get that information with PowerShell. You would think that you'd be able to run a PowerShell command and it would return the results. Well, not Read more [...]

Displaying Toast Notifications for a Different User when PowerShell Module Updates are Available

A couple of months ago, Josh King presented a session on “Using BurntToast to Display Timely Notifications” for our June 2018 Mississippi PowerShell User Group virtual meeting. I was previously planning to write something to display balloon notifications in Windows and I learned that they're now called toast notifications. I also learned that Josh had created a module named BurntToast which performs most of the heavy lifting so I could simply take advantage of it instead of writing my own code. Note: Read more [...]

Use PowerShell to Determine What Your System is Talking to

Recently, while troubleshooting a problem with a newly installed application, I wanted to see what it was communicating with. My only requirement was that I wanted to use PowerShell if at all possible. I couldn't remember if there was a PowerShell command for accomplishing this task or not, but I remembered seeing something about it in Patrick Gruenauer's chapter (PowerShell as an Enterprise Network Tool) in The PowerShell Conference Book. Note: This blog article is written using Windows 10 version Read more [...]

The PowerShell Conference Book is the Featured Book and the Number 1 Best Seller on Leanpub

By now, I'm sure you've heard about The PowerShell Conference Book. If not, see my previous blog article. The PowerShell Conference Book is currently the featured book on Leanpub. It's also the number one best seller on Leanpub. And the top book on Leanpub. The book was published last Friday, July 6th with nine of the thirty-three chapters and we've added an additional six chapters since then. I would like to thank everyone who has purchased the book so far. If you have a Read more [...]