Beyond Impact Blog

Cole McDonald

Internet Pioneer, Digital Futurist

Recent Posts

Garbage Collection in Powershell to Speed Scripts

Apr 25, 2018 12:50:46 PM / by Cole McDonald posted in powershell, automation, loops, devops

5 Comments

I've recently produced a couple of scripts that produce large, in memory objects that they're storing out to a CSV file as they go.  My thread counts for Powershell are running high as I'm looping through several instances of these larger objects.  Although my CPU and Memory are fine per the Resource Manager, the script is running very slowly and the thread count continues to rise.

Read More

Using MomCertImport.exe  in a Powershell Workflow to Automate Certificate Deployment on SCOM Gateways

Nov 9, 2017 7:58:21 AM / by Cole McDonald posted in powershell, SCOM, automation

0 Comments

In my continuing efforts to fully automate a SCOM environmental deployment, I've been tackling how to go about automating registering the SCOM gateways to the Management Server Pool.  I've got most of the process done, but the certificate registration has tried to elude me as the MOMcertImport tool doesn't work directly from Powershell.  Luckily, Powershell allows us to work around that using the Start-Process cmdlet to run an executable application in its own cmd.exe instance.
Read More

Using SCOM to Automate the OMS Workspace Fix

Sep 22, 2017 2:34:32 PM / by Cole McDonald posted in powershell, SCOM, Azure, OMS

0 Comments

Last time (Fixing OMS Workspaces) we looked a way to repair or distribute OMS Workspace settings using Powershell.  Wouldn't it be nice if we could leverage SCOM's access to individual machines to be able to keep them attached to the workspaces?  If we could pull this off, we could minimize the amount of time we're blind to each server in our environment.  Why use SCOM to push OMS settings?

Read More

Azure OMS Workspace Settings Disappearing

Sep 15, 2017 11:00:08 AM / by Cole McDonald posted in powershell, SCOM, Azure, OMS

0 Comments

We've seen some interesting behaviors in Azure with the Healthservice Agent which provides the connection to SCOM in our hosted environment and OMS in Azure.  The management groups registered with the service (Healthservice - Microsoft Management Agent - MMA for short) seem to disappear every once in a while.  We suspect it happens during updates to the agent (extension if you're deploying from the Azure portal).

Read More

Recursive SCOM Subgroup Member function

Aug 18, 2017 11:04:44 AM / by Cole McDonald posted in powershell, SCOM, Utility Functions

0 Comments

Sounds Fancy!  The problem I was having was that SCOM doesn't have a default way to look at all of the members of a group/subgroup tree in a convenient way.  The Get-SCOMGroup cmdlet doesn't have an option to recursively search any subgroups it finds.  It requires all kids of clunky Powershell to enumerate all of that if you need it.  I needed it.

Read More

SCOM - Can't add manually installed agents

Jul 21, 2017 3:48:50 PM / by Cole McDonald posted in powershell, SCOM, automation

4 Comments

Straight to the code: https://github.com/cole-mcdonald/SCOM-GhostedObjects

Read More

Setting SCOM Gateway Failover using Powershell

Apr 3, 2017 1:00:00 PM / by Cole McDonald posted in system center operations manager, powershell, SCOM

0 Comments

Microsoft's System Center Operations Manager has much more power than the interface allows access to.  Of exceeding importance in an enterprise setting is building high availability into our systems.  SCOM includes much of this by default in the management structures.  The interface no longer reflects these settings, but they're still available to us through Powershell.  Here's a little script I use in our environment for bringing new gateways online.

Read More

Learn Powershell in 5 (More) Painless Steps: Data - Movement

Mar 16, 2017 7:51:24 AM / by Cole McDonald posted in 5 painless steps, powershell, object oriented programming

2 Comments

We've dealt with what types of data we can store in increasingly complex ways. It's time to start dealing with a discussion of "we've got it, what can I do with it? Let's start with the basics of object oriented programming.  An object is an instance of a class.   OOP, there it is!

If we think of our programs we're writing in terms of a series of blocks of code which accepts specific types of data in, does stuff to them, then hands them off to another block of code to do more stuff with, the method of moving that data becomes important. If it's all within a single computer, huge custom objects can be made and stuffed into a variable and that variable can be passed between each of the blocks of code to work on just the pieces of information it needs to do its specific job.

Read More

Learn Powershell in 5 (More) Painless Steps: Data - Storage

Mar 6, 2017 1:00:00 PM / by Cole McDonald posted in Data, arrays, 5 painless steps, powershell, automation

0 Comments

In our previous series on learning Powershell, the very first topic of discussion was the storage of data.  In my opinion, the 2 most important things in computing are interface and data structure.  As developers, our interface to the data is using varible naming conventions that make sense.  Each of us have a personal style, but using descriptive names for our variables serves us when we inevitably have to revisit our own code a year from now.  Comments, variable names, and formatting make it easier to get back to work rather than spending time figuring out what we were thinking a year ago.
Read More

Learn Powershell in 5 (More) Painless Steps: Data - Types

Feb 27, 2017 1:38:58 PM / by Cole McDonald posted in Data, 5 painless steps, powershell

0 Comments

We've taken the time to learn how to use Powershell to grab a bunch of information.  We've discussed how to use it to do stuff and some of the types of things we can do with it.  It's time to dig a bit deeper into how we're dealing with the information we're gathering to make it easier, faster, stronger to use once we've gathered it.  This will get even more geeky than we've done so far.  Hold on to your keyboards, this could get messy.
Read More

Subscribe to Email Updates

Recent Posts