PowerShell

PowerShell: Check if VMware vShield driver is installed and running

The VMware vShield driver is a system driver named vsepflt. It is easy to check the status of this driver by running msinfo32.exe and navigating to “Software EnvironmentSystem Drivers” This can however be a bit cumbersome on an environment with more than one virtual machine. That’s why I recommend using PowerShell instead. The System Drivers category displayed by msinfo32 is nothing else than the WMI-class Win32_SystemDriver, so I wrote a short function that can be used to inventory the status of the VMware vShield driver.

Where() method in powershell 4 breaks my objects!

Boe Prox wrote an excellent post on the new Where() and Foreach() methods in Powershell Version 4 over at his blog: http://learn-powershell.net/2013/11/26/checking-out-the-where-and-foreach-operators-in-powershell-v4/ I decided to play around with these a bit and discovered a behavior I didn’t expect. When using the Where() method instead of Where-Object, the output differ and I can no longer access and update my original object. This is because Where() always returns a collection of objects (even if it’s only a collection of one object).

Subscriptions in SCOM 2007 automatically disabled

This post is all about an old and well known issue but I haven’t found any automated solution to it so I’d like to share mine. But first an introduction: When editing a subscription in System Center Operations Manager 2007 the subscription is tagged with the SID of the administrators user account. This is all good until the day that that account is removed from the SCOM administrators role. And maybe, if the administrator in question leaves the company, the account is even removed from Active Directory.

Powershell: When was the password last reset for the Local Administrator Account?

In my last post (found here) I wrote about how to determine the account name of the local administrator account on a computer. Now that we know the account name, when did the password last change on that account? Managing local accounts on computers (clients or servers) can be a hassle and one thing that makes auditing a little bit simpler is to find out how old the password for a local user on a machine is.

Powershell: Find builtin local Administrator account

Administrating accounts on local computers (clients of servers) is not that common in a domain environment, but there is one account that often get discussed – the local administrator. Some companies disable this account on machines, some set its password to a standard password and some randomize a password at deployment and keeps track of them in a database or similar. The thing is that sometimes, often in troubleshooting scenarios, it is really convenient to have the password for the local administrator account on a server at hand, but it can be tricky to keep track of which password to use on which server.