SCCM Updates and Powershell

Date: 12 October 2015

Categories: SCCM, WMI, CIM, powershell

Microsoft is doing cool things with Windows Server with what was originally server core and is now the base version of Windows Server. Combined with Powershell remoting and there’s a lot of power from the command line. Unfortunately, is surprisingly difficult to tell if updates are available and to trigger their installation. If you’re not using SCCM, you can run sconfig.exe and select option 6 to manage your updates but packages and applications pushed through SCCM don’t show up there.
Following up on a previous post discussing finding old user accounts in Active Directory, here’s how you find old computer accounts. This works on basically the same premise as the user script. In short, we’re going to check the last time the computer logged into Active Directory. That happens on every reboot and from time to time while the machine is up. The same warning applies to computers as it does for user accounts.
I’ve been putting off dealing with a problem at work for a while and I finally worked out a way to deal with it. At work, when a faculty or staff member leaves, we don’t delete the account right away. Instead, the account is disabled. It’s sort of a CYA policy. It came in useful today, in fact, when I was told that the professor whose account I disabled a couple of days ago was actually granted emeritus status and so his account needed to hang around a while more.

Chasing the "tail"

Date: 01 December 2010

Categories: powershell

While trying to get System Center Configuration Manager to install a package on a new server, I rediscovered why I hate working in Windows and why I like PowerShell. I wanted to check the end of a series of log files to see what was going on. Unfortunately, Windows has no obvious analog to the unix tail command. Fortunately, my friend Jon Angliss had most of a solution. Get-Content <filename> -wait That’s close to what I want but not quite.