Tobias Weltner
2008-06-14 06:48:38 UTC
When I do this, I get a strange "RPC Server not available" error message:
$klasse = 'Win32_Service'
$methode = 'StopService'
$class = [wmiclass]$klasse
$class.psbase.methods[$methode].OutParameters
When done from within VB.NET, all is good:
Dim methode = "StopService"
Dim c As New System.Management.ManagementClass(klasse)
Dim o As Object = c.Methods(methode).OutParameters
MsgBox(o.GetType.Name)
This seems to be a bug in PowerShell. Can anyone explain/provide a
workaround?
Thx
Tobias
www.powershell.com
$klasse = 'Win32_Service'
$methode = 'StopService'
$class = [wmiclass]$klasse
$class.psbase.methods[$methode].OutParameters
When done from within VB.NET, all is good:
Dim methode = "StopService"
Dim c As New System.Management.ManagementClass(klasse)
Dim o As Object = c.Methods(methode).OutParameters
MsgBox(o.GetType.Name)
This seems to be a bug in PowerShell. Can anyone explain/provide a
workaround?
Thx
Tobias
www.powershell.com