![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Is easier WMI static class access in the works for 1.1+? First of all, my compliments on the fact that Get-WmiObject -List _does_ return static class references. There are times when you absolutely need them, and although we could take other avenues to getting to them, being able to use the cmdlet makes life much better. Unfortunately, it's a bit awkward trying to access a specific static class or subset of the classes. You can do Get-WmiObject -List and get back every class on the system, but you cannot pre-filter; you get every class in the namespace back, which on my system (AMD 1.67GHz, 768 MiB RAM) takes about 10-12 times as long as directly get all instances of, say, Win32_NetworkAdapterConfiguration. This is livable in most cases, but if we don't have a WMI provider in the works for v1.1, static class access is important in analyzing classes and is a requirement for invoking static methods of the class. Are we planning on doing anything to simplify static access? The simplest way might be to add a WmiBase property to WMI objects, allowing easy access to the underlying class. This is probably doable now (although I haven't yet thought about it in detail). Another option would be to allow the -List parameter to accept a wildcard-supporting <string[]>. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Vista: static works, DHCP does not work | Vista networking & sharing | |||
| how to call a static method in a .net class from powershell? | PowerShell | |||
| Access a static member on a nested static class. | PowerShell | |||
| Access a static member on a nested static class. | PowerShell | |||