I’ve seen lots of methods for checking whether or not a variable in Powershell contains an array. All of them work, so really it comes down to which one is the easiest. Some cmdlets and constructs will error out if you treat them like an array, or more commonly, produce unexpected results. Here are the two methods I’ve used for this over the years, I’ll let you be the judge of which one is the easiest.
Year: 2014
Upgrading to Raspian (Jessie) on Raspberry Pi
So you’ve just gotten your new, shiny Raspberry Pi, and you’re installed Raspbian on it. Raspbian installed with NOOBS (New Out of Box Software) is a version called “Wheezy”, which as some of you may know, is not the latest and greatest release. If you need help installing Raspbian, the Raspberry Pi Foundation has a great how-to here. But if you’re ready to go, upgrade to Raspbian Jessie with these steps.
Debugging Powershell Scripts for Orchestrator 2012
Let me start by saying I love Powershell. It’s a extremely powerful and strangely fun language to code with that can make virtually any aspect of my day faster and easier. Along those same lines I love Orchestrator, because it can take those tasks and automate them. You can even integrate your runbooks with something like Service Manager Self Service Portal to offer delegation of your automated tasks to other users so you don’t spend your day running reports off of scripts you wrote or some other tedious task.
With all of that being said, writing Powershell scripts that work as expected with Orchestrator can be a pain, unless you’re running a 32-bit Windows 7 machine, more on that later.
Lync Server 2010 – Edge Server Issue with KB2982385
Microsoft released a bunch of patches this last patch Tuesday, one of which was an update to Lync Server, KB2982385, meant to address a security vulnerability that could allow a possible Denial of Service attack. More info on the vulnerability is available on Technet. I know some people have had an issue applying this patch and with any luck this post can save you a bit of time.
Internet Slowdown Day
Today is Internet Slowdown Day, the day where Internet users, big tech companies, and those that are in between things to believe in band together to fight the ever-present threat against Net Neutrality. Some of the biggest tech companies around such as Netflix, Mozilla, and Reddit are banding together to get the word out that the changes currently being discussed at the FCC can have real consequences unless we all do something about it and make our voices heard.
Load Balancing SCOM 2012 Agents
So we’ve recently stood up SCOM 2012 and after weeks of planning we deployed it into our environment. We used SCCM 2012 to push out clients, which isn’t as well supported as I would like, considering they’re sister components of Microsoft System Center, but I digress. Our application deployment in SCCM pointed to one of our two management servers, which rapidly began to fill up with clients, while the other management server sat idle. I wasn’t about to start moving clients manually, so I set out to automate the process of load balancing agents between management servers on a nightly basis.
Automating Orchestrator 2012 Runbooks with Scheduled Tasks
I was recently faced with the challenge of having some Orchestrator 2012 runbooks fire off on a schedule, mainly for custom Active Directory reports that other teams want to receive on a regular basis. Since the days of doing such tedious tasks manually are (thankfully) long gone, I decided to use Orchestrator to automate the creation and distribution of these reports.
The Problem
While it’s a fairly well known fact that Orchestrator has this ability built in via the Monitor Date/Time Activity, I have a hard time stomaching the fact that the runbook has to be running all the time just for its five minutes per week to be useful. So naturally you think about scheduled tasks, but they you have to write a Powershell script for every runbook you want to automate, then create a corresponding Scheduled Task, label it something useful, set it up, test it, and so on. I also considered launching all periodic runbooks from a master scheduler runbook, which wasn’t a bad idea, but everytime I wanted to add another report, I would have to rework this master runbook which would eventually swell to a Krakken-esque monster of lines, activities, data passing, and other headaches.