*****

[important]New version of the PowerShell WMI module 2.0 is out. It has now 19 cmdlets in total! To get the latest version of it, click here [/important]

*****


 

 

 

WMI PowerShell module

 

 

 


 

 

Have you ever needed to create a new WMI property ? Have you ever needed to create that WMI property in a specefic (and new) WMI class ?

Well, if you did, the WMI-Module is what you are looking for then !

After setting up the method on how to measure a Task sequence time (which I explained here), I needed to add it at the end of our task sequence in the “tatoo” section.

In OSD, we generaly like to put the same information, in various locations : Registry, environment variable and in the WMI repository. The registry and environment variable are pretty easy (or lets say that was something I had already done before), but how do we actually add a WMI property and a new WMI class ?

That is a good question right ?

I have started to write some cmdlets in order to create a class, then a property, then to import or export MOF files, and sooner then I thought, I came up with the WMI PowerShell Module.

And it is my turn to give something back to the PowerShell community.

For now, the module is composed of the following cmdlets :

Compile-MofFile
Export-MofFile
Get-WMIClass
Get-WMICommands
New-WMIClass
New-WMIProperty
Remove-WMIClass
Remove-WMIProperty
Set-WMIPropertyValue

New cmdlets will probably still come, and most likley, with your very valuable feedback, I will publish a new updated version with any eventual bug fixes etc…

[important]Download the latest version of the module on technet right here.[/important]

Here under you will also have the current listing of the module. You can either download it from technet here, or copy paste the listing here below in a new text file called “WMI-Module.psm1

Listing WMI-Module.psm1

 

By | 2016-10-19T21:00:17+00:00 July 24th, 2014|Functions, module, PowerShell, WMI, wmi module|2 Comments

About the Author:

Stéphane is a dynamic and passionate Cloud and datacenter Microsoft MVP since. He is the founder of the Basel PowerShell user Group (BPUG), the co-founder of the French Speaking PowerShell UserGroup (FRPSUG), author, blogger, and received the community award "PowerShell Hero" from PowerShell.org. Stéphane has implemented microsoft infrastructure solutions in various countries of Europe and is currently working in Basel / Switzerland. Stéphane help his clients to reduce their global infrastructure costs by implementing Microsft infrastructure solutions by combining great products such as System Center, Windows Server, with heavy automation using Windows PowerShell. Stéphane loves languages, Belgium beer, French cheese and French Wine. If any of these topics are of your interest, don't hesitate to come and say hi.

2 Comments

  1. Stephane August 12, 2014 at 11:54 am - Reply

    Thank for your comment Dustin !

    I have looked at your code, and I think you have done a great work as well ! Indeed, we have some overlapping functions, but I didn’t knew when I started writing my functions the existence of your module.

    Nevertheless, I do have a version 2.0 in the pipe, I simply need some time to finish the help sections. I will upload it soon !

    In what context have you used the module ? OSD ? let me know, I am curious to see 🙂

    Stéphane

  2. Dustin Hedges August 1, 2014 at 4:39 pm - Reply

    I like what you’ve done here. Some overlap with what I’ve done, but a good approach nonetheless. http://gallery.technet.microsoft.com/PowerShell-WMI-Module-f6bf8222

Leave a Reply

%d bloggers like this: