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.
Garbage Collection in Powershell to Speed Scripts
Apr 25, 2018 12:50:46 PM / by Cole McDonald posted in powershell, automation, loops, devops
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
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.
SCOM - Can't add manually installed agents
Jul 21, 2017 3:48:50 PM / by Cole McDonald posted in powershell, SCOM, automation
Straight to the code: https://github.com/cole-mcdonald/SCOM-GhostedObjects
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
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.
On to the future with Powershell...
Feb 21, 2017 6:13:14 PM / by Cole McDonald posted in 5 painless steps, powershell, automation, devops
We're a month and a half out from when I started
my 5 Painless Steps Powershell learning series. It was a smashing success. I was hoping a few dozen people would find it useful. It was viewed by over 2500 people. Yikes!
Content not found