![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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) |
| | WMI cmdlets in CTP I've been looking at the new WMI cmdlets in the CTP - Invoke-WMIMethod and Set-WMIInstance Invoke-WmiMethod -Class Win32_process -Name Create -ArgumentList calc.exe works exactly as you would expect it to I then moved on to trying the DNS namespace and get errors about the methods don't exist - when I've used them via V1 syntax. Couple of questions: 1) If a method is only accessible using a psbase construction eg $rec = Get-WmiObject -ComputerName DC02 -Namespace 'root\MicrosoftDNS' -Class MicrosoftDNS_AType -Filter "IPAddress = '192.168.172.20'" $rec.psbase.Delete() can I access it via Invoke-WMIMethod 2) Are Invoke-WMIMethod and Set-WMIInstance limied in the namespaces they can access? Don't see why they should be bu tthey don't seem to like the MicrosoftDNS namespace 3) if I have multipe arguments for the -ArgumentList parameter in Invoke-WMIMethod do I need to create a hash table as in Set-WMIInstance. 4) Does the -Flag parameter in Set-WMIInstance actually exist - its in the documemtation but I get an error saying it doesn't exist when I try to use it -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WMI cmdlets in CTP RichS wrote: Quote: > I've been looking at the new WMI cmdlets in the CTP - Invoke-WMIMethod and > Set-WMIInstance > > Invoke-WmiMethod -Class Win32_process -Name Create -ArgumentList calc.exe > > works exactly as you would expect it to > > I then moved on to trying the DNS namespace and get errors about the methods > don't exist - when I've used them via V1 syntax. > > Couple of questions: > > 1) If a method is only accessible using a psbase construction eg > > $rec = Get-WmiObject -ComputerName DC02 -Namespace 'root\MicrosoftDNS' > -Class MicrosoftDNS_AType -Filter "IPAddress = '192.168.172.20'" > $rec.psbase.Delete() > > can I access it via Invoke-WMIMethod > > 2) Are Invoke-WMIMethod and Set-WMIInstance limied in the namespaces they > can access? Don't see why they should be bu tthey don't seem to like the > MicrosoftDNS namespace > > 3) if I have multipe arguments for the -ArgumentList parameter in > Invoke-WMIMethod do I need to create a hash table as in Set-WMIInstance. > > 4) Does the -Flag parameter in Set-WMIInstance actually exist - its in the > documemtation but I get an error saying it doesn't exist when I try to use it > on it. #4 may be just an example of a upcoming feature that was slipped into the documentation ahead of it actually being programmed in. Marco -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
| | #3 (permalink) |
| | Re: WMI cmdlets in CTP Quote: > I've tried asking a private list I am on with a lot of Microsoft folks > on it. the Microsoft WMI team. No news otherwise... Marco |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| sql cmdlets ? | PowerShell | |||
| Quest AD cmdlets RC1 | PowerShell | |||
| Can't add Quest AD cmdlets | PowerShell | |||
| ADO and XmlDocument cmdlets? | PowerShell | |||
| ParameterSetName in cmdlets | PowerShell | |||