PowerCLI – Function to Wait for Windows VM to Reboot

Sometimes VMWare Tools will report that a Windows VM is running before all the services are actually running.  I created the following simple PowerCLI function to poll for VMWare Tools status, then wait an extra 5 seconds before returning in order to ensure that all services are, in fact, operational: wait-reboot VMName function wait-reboot { … [Read more…]

Powershell – Automating HP c7000 Virtual Connect Domain Configuration

In preparation for private cloud deployment, our HP c7000 BladeSystem Virtual Connect domain needed configuration.  Of course, the VCEM modules allow CLI interaction, so I figured I could automate the process using a script.  Problem is, the SSH buffer maxes out after about 50-60 lines from the script, resulting in catastrophic configurations.  As always, PowerShell has … [Read more…]

Create Self-Signed Certificate for Windows

I ran into an issue with a Windows server that lost its self-signed certificate (the circumstances surrounding this event are embarrassing, and therefore, irrelevant).  I needed to recreate the self-signed cert in order to Remote Desktop to the machine, but could not find a lot of references on doing so after a moderately exhaustive search … [Read more…]

PowerShell – Remote Session to Domain Controller

Sometimes you need to run Active Directory scriptlets in PowerShell, but logging into your DC takes too long, there are too many RDCs already, or you’re just lazy.  Regardless, the following script will allow you to initiate a remote PowerShell session to your DC and import the ActiveDirectory module, so you can perform AD administration … [Read more…]

PowerShell – Roll Microsoft Print Cluster

In later releases of Microsoft’s print clustering service, moving the primary node of a cluster requires setting up dependencies correctly, otherwise, node splitting occurs.  Instead of fixing the improper cluster configuration, I wrote the following PowerShell script to roll each cluster group required to the standby node.  This script was written with a 2 node … [Read more…]

PowerShell – New NetApp LUN

Sometimes you need a LUN quickly.  In cases like these, it’s helpful to be able to use PowerShell instead of NetApp’s GUI.  Fortunately, there is a way (requires downloading the NetApp DataOnTap PowerShell Module ver 3.x, which requires you to create an account and sign in).  The following script will create a Volume and LUN of … [Read more…]

PowerShell – Install SCCM 2012 R2 Prerequisites

This is a fairly complicated script that will install the required prerequisites to install SCCM 2012 R2 on a server.  It was designed under the functional model in order to compartmentalize each step required, reducing the overall complexity.  The script requires media in order to complete successfully, detailed in the Script Media Requirements section below. … [Read more…]