Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

can't get WMI method InParameters

Closed Thread
 
Thread Tools Display Modes
Old 12-08-2006   #1 (permalink)
/\\/\\o\\/\\/ [MVP]
Guest


 

can't get WMI method InParameters

Can someone confirm these errors ?
, I'm on Vista RTM and PowerShell RC2
I think I did this successfull on RC2 + XP

also I can succesfull lookup the InParameters in WbemTest, so the WMI part
looks right

I can't get this working, don't know where to look anymore

Greetings /\/\o\/\/

PoSH>([wmiclass]"win32_share").psbase.methods['Create'].InParameters
format-default : Exception retrieving members: "The RPC server is
unavailable. (Exception from HRESULT: 0x800706BA)"
PoSH>([wmiclass]"win32_share").psbase.methods['Create'] | ft In*

InParameters
------------
System.Management.ManagementBaseObject


PoSH>([wmiclass]"win32_share").psbase.get_methods().get_item('Create').get_InParameters()
format-default : Exception retrieving members: "The RPC server is
unavailable. (Exception from HRESULT: 0x800706BA)"
PoSH>

PoSH> $opt = new-object system.management.ObjectGetOptions
PoSH> $opt.UseAmendedQualifiers = $true
PoSH>$WMIClass = 'win32_share'
PoSH>$MC = new-object system.management.ManagementClass($WMIClass,$opt)
PoSH>$mc.PSBase.Methods['create']


Name : create
InParameters : System.Management.ManagementBaseObject
OutParameters : System.Management.ManagementBaseObject
Origin : Win32_Share
Qualifiers : {Constructor, Implemented, MappingStrings, Static...}



PoSH>$mc.PSBase.Methods['create'].InParameters
format-default : Exception retrieving members: "The RPC server is
unavailable. (Exception from HRESULT: 0x800706BA)"

Greetings /\/\o\/\/

Old 12-08-2006   #2 (permalink)
/\\/\\o\\/\\/ [MVP]
Guest


 

Re: can't get WMI method InParameters

Arrg.., I missed

([WMIClass]'win32_share').psbase.GetMethodParameters('Create')

was in this post in generated scripts, but in the code it did work then :
$inParam = $mc.Get_Methods()[$WMIMethod].get_InParameters()

http://mow001.blogspot.com/2005/11/w...3-methods.html

Gr /\/\o\/\/

"/\/\o\/\/ [MVP]" <mow001@hotmail.NoSpam> wrote in message
news:F3D5C695-6632-454E-864F-244F891223CB@microsoft.com...
> Can someone confirm these errors ?
> , I'm on Vista RTM and PowerShell RC2
> I think I did this successfull on RC2 + XP
>
> also I can succesfull lookup the InParameters in WbemTest, so the WMI part
> looks right
>
> I can't get this working, don't know where to look anymore
>
> Greetings /\/\o\/\/
>
> PoSH>([wmiclass]"win32_share").psbase.methods['Create'].InParameters
> format-default : Exception retrieving members: "The RPC server is
> unavailable. (Exception from HRESULT: 0x800706BA)"
> PoSH>([wmiclass]"win32_share").psbase.methods['Create'] | ft In*
>
> InParameters
> ------------
> System.Management.ManagementBaseObject
>
>
> PoSH>([wmiclass]"win32_share").psbase.get_methods().get_item('Create').get_InParameters()
> format-default : Exception retrieving members: "The RPC server is
> unavailable. (Exception from HRESULT: 0x800706BA)"
> PoSH>
>
> PoSH> $opt = new-object system.management.ObjectGetOptions
> PoSH> $opt.UseAmendedQualifiers = $true
> PoSH>$WMIClass = 'win32_share'
> PoSH>$MC = new-object system.management.ManagementClass($WMIClass,$opt)
> PoSH>$mc.PSBase.Methods['create']
>
>
> Name : create
> InParameters : System.Management.ManagementBaseObject
> OutParameters : System.Management.ManagementBaseObject
> Origin : Win32_Share
> Qualifiers : {Constructor, Implemented, MappingStrings, Static...}
>
>
>
> PoSH>$mc.PSBase.Methods['create'].InParameters
> format-default : Exception retrieving members: "The RPC server is
> unavailable. (Exception from HRESULT: 0x800706BA)"
>
> Greetings /\/\o\/\/
>


Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
method not many USER Vista mail 0 06-25-2008 05:51 AM
Help with the collection contains method Tanzen .NET General 7 06-19-2008 04:07 AM
Method invocation failed because [System.String] doesn't contain a method B Williams PowerShell 0 03-31-2008 06:00 PM
displays method but cannot use it Frank PowerShell 2 08-20-2007 12:39 PM
Instr Method? Fred J. PowerShell 3 09-30-2006 08:58 PM








Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50