O'Reilly logo

PowerShell Deep Dives by Edited by Jeffery Hicks, Richard Siddaway, Oisín Grehan, and Aleksandar Nikoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Building your own WMI-based cmdlets

Richard Siddaway

Windows 8 and Windows Server 2012 come with a mass of new PowerShell functionality. Depending on the features installed the server version may have 2,500 or more new cmdlets! Did you know that of that of those 2,500 cmdlets, more than 60 percent are based on Windows Management Instrumentation (WMI)? This chapter explains how you can create your own WMI-based cmdlets.

Discovering WMI-based cmdlets

On a Windows 8 or Windows Server 2012 system try this:

PS> Get-ChildItem -Path $pshome\modules\netTCPIP Directory: C:\Windows\System32\WindowsPowerShell\v1.0\modules\netTCPIP Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 26/08/2012 14:40 en-US -a--- 02/06/2012 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required