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.
Using MomCertImport.exe in a Powershell Workflow to Automate Certificate Deployment on SCOM Gateways
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.
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.
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!