Monthly Archives: January 2014

When did Windows update last run

A question came up on the forum regarding when Windows Update last run and when an update was last installed.  Get-Hotfix shows the date of installation for most BUT not all patches. The registry holds values showing last successful detection … Continue reading

Posted in Powershell, Registry | Leave a comment

Win32_OperatingSystem examples

The Win32_ComputerOperatingSystem class can provide a good deal of information about the OS installed on your machines. These examples are converted from those presented here: http://msdn.microsoft.com/en-us/library/aa394596%28v=vs.85%29.aspx # ServicePack versionGet-CimInstance -ClassName Win32_OperatingSystem | select ServicePackMajorVersion, ServicePackMinorVersion # install date of OSGet-CimInstance … Continue reading

Posted in CIM, PowerShell V3, PowerShell v4 | Leave a comment

Win32_Process examples–running applications

You can see the running processes on a local or remote machine using Get-Process. Alternatively you can use Win32_Process: Get-CimInstance -ClassName Win32_Process | select Name, ProcessID, Threadcount, PageFileUsage, PageFaults, WorkingSetSize | Format-Table –AutoSize You can use the –ComputerName or –CimSession … Continue reading

Posted in CIM, PowerShell V3, PowerShell v4 | Leave a comment

Win32_Process examples–test command line

To see the command lines that have been used when processes are started is simple one liner: Get-CimInstance -ClassName Win32_Process | select Name, CommandLine If you want to investigate specific processes use the –Filter parameter to restrict the processes

Posted in CIM, PowerShell V3, PowerShell v4 | Leave a comment

Win32_Examples–start application in hidden window

This one is interesting as I’d tried doing this a while back and failed.  Starting a process with Win32_Process is straightforward but controlling the process – such as starting in a hidden window wasn’t working. This is how you do … Continue reading

Posted in CIM, PowerShell V3, PowerShell v4 | Leave a comment

Winter Scripting Games 2014–event 1

The event instructions for event 1 are available for download. Entries will be accepted starting tomorrow. Event will close 26 January 00:00:00 UTC

Posted in Scritping Games 2014 | Leave a comment

Win32_Process examples–running scripts

Back in the day when all we had was VBScript you could run scripts through the command line (cscript) or you would get a more graphical interface (wscript).  One of the examples at http://msdn.microsoft.com/en-us/library/aa394599(v=vs.85).aspx shows how to detect running scripts. … Continue reading

Posted in CIM, PowerShell and WMI, PowerShell V3, PowerShell v4 | Leave a comment