Many WMI classes have methods. Methods allow us to perform some action on the object. A recent question on the forum about using methods made me realise that there are still a lot of people following the old VBScript way of doing things.

I found a class new to me - Msft_Providers and this got me interested in WMI providers.
PS> Get-CimInstance -Class Msft_Providers | select -ExpandProperty provider
Msft_ProviderSubSystem
SCM Event Provider
WmiPerfClass
That seems a bit low. Digging a bit more I got back to the old...

In the last post I showed that there was an issue with the way the SetDNSServerSearchOrder of the Win32_NetworkAdapterConfiguration class worked
This would work
$nic = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index=7"
$nic.SetDNSServerSearchOrder("10.10.54.201")
but...

Three new chapters are added to the MEAP – Manning Early Access Program
Chapter 3 – Using the PowerShell help system – includes PowerShell v3 Updateable help
Chapter 5 – Working with PSsnapins and Modules
Chapter 9 – Formatting
0 CommentsRSS FeedEmail a friend

About This Blog

A blog for Windows administrators, Architects, Consultants and System Integrators maximizing the use of PowerShell and WMI. Simple solutions to everyday problems using two tools that should be available on every Windows system. Save time, save effort, script now!