PowerShell for Windows Admins:


March 27, 2014  2:49 PM

Improving CIM/WMI method discovery

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

I recently showed how to create a function that could be used to simplify the use of Get-CimClass. In this version I’ve added some features: - parameter validation - namespace - try-catch round getting the class information. This turns the code into: function Get-CimMethod...

March 25, 2014  2:21 PM

Deal of the Day–26 March

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Tomorrow – 26 March – several PowerShell books will feature in Manning’s Deal of the Day: PowerShell in Depth 2E PowerShell and WMI PowerShell Deep Dives All highly recommended and full of PowerShell goodness


March 23, 2014  4:51 AM

Discovering CIM/WMI methods and parameters

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

As you’ve probably gathered I spend a lot of time working with, and investigating, CIM (WMI) classes. CIM and WMI will be treated as synonymous for these articles. If you want to discover the methods available on a CIM class you can do this: $class = Get-CimClass -ClassName...


March 20, 2014  12:36 PM

Where’s the value

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

PowerShell is object based – its the one fact that is mentioned in very introduction to PowerShell – and its the use of objects that gives PowerShell its reach and power. The use of objects has one tiny drawback. When you want the actual value of a property you have to do slightly more...


March 18, 2014  3:34 PM

Continue please

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

I needed to be able to skip processing in a loop and remembered that the continue command suspends the loop processing and immediate goes back to the top of the loop. I thought a quick look at how it works in different types of loop would be worthwhile. These all work and produce the same...


March 9, 2014  4:59 AM

End of PowerShell Jobs week

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

My series on PowerShell Jobs for the Scripting Guy blog has finished.  The set of articles is: Jobs week 1 : Introduction to PowerShell jobs


March 2, 2014  3:10 PM

PowerShell Jobs Series

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Today sees the start of my series of articles on PowerShell jobs for the Scripting Guy blog. First article is here - 0 Comments     RSS Feed     Email a friend


February 27, 2014  4:20 PM

I’m afraid you can’t do that anymore

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

In PowerShell 1.0 you could do this: notepad $proc = Get-WmiObject -Class Win32_Process -Filter "Name='notepad.exe'" $proc.Terminate() To access the methods of the WMI class you had to get a variable representing the instance and call the method. This technique still works in PowerShell...


February 26, 2014  4:47 PM

Useful storage cmdlets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Scanning through the Storage module there is a bunch of useful cmdlets – starting with the Get* cmdlets: Get-Command -Module Storage...


January 14, 2014  12:24 PM

VM disk info

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

A question came into the forum about getting information on the virtual disks associated with particular Hyper-V virtual machines. Is a bit of a digging exercise but this gets the results: Get-VM | foreach { $VMname = $psitem.Name Get-VMHardDiskDrive -VMName $VMname  | foreach { Get-VHD...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: