by Rich Rousseau
9. January 2009 07:36
Recently I needed to know if a particular windows patch was installed on my machine. I went to Add/Remove Programs and checked the "Show Updates" option, but the list there was too long and my eyes too tired to try and scan them all manually. I thought this should be an easy task for PowerShell, but I didn't know how to access a list of installed updates. I decided WMI would be a good place to start and did quite a few searches using "Get-WmiObject -List". I queried a few different providers that I thought would list them, but I wasn't getting anywhere. I'm sure there is a WMI Provider that lists all windows updates, but couldn't find it.*
Luckily, a
coworker of mine who I had been discussing this with helped immensely when he pointed me to a
script that would list all installed software. The script uses a registry entry that lists all "uninstallable" software. I knew I could easily search the registry using PowerShell and set about looking for my particular update with the following...
dir HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | where {$_.Name -Like '*kb956391*'}
*I have since found that Win32_QuickFixEngineering will list all windows hotfixes…
Get-WmiObject -Query 'select * from Win32_QuickFixEngineering' | where {$_.HotFixID -eq 'KB956391'}
by Rich Rousseau
31. December 2008 23:24
If you want to use Windows Server 2008 or Vista SP1 as a guest operating system with Virtual PC 2007, you'll need
Virtual PC 2007 SP1. Updates for both x86 and x64 clients are available. Not sure if you could get either of these working using a different OS selection in VPC. I'm eager to try out the remoting feature in Powershell v2 and currently these operating systems are they only ones that support Powershell remoting.
by Rich Rousseau
20. August 2007 23:39
Some quick functions I created to reduce my time at the subversion command line. The trick here is that I couldn't just alias the commands, I needed to create some small functions for each...
function st {Invoke-Expression "svn status"}
function sup {Invoke-Expression "svn update"}
function sci {Invoke-Expression "svn ci"} --I use the %SVN_EDITOR% env var for my checkin message editing
function sin {Invoke-Expression "svn info"}
You could easily modify these to accept parameters...
function srv ([string]$filename){Invoke-Expression "svn revert $filename"}
I imagine I'll want these to be more flexible in the future, but for now they're saving me a lot of typing!