Unable to invoke CIM method parameters
we need identify terminal servers pointing license servers. info can obtained calling method getspecifiedlicenseserverlist in win32_terminalservicesetting class
this method has following parameters
ps c:\users\abhas> (get-cimclass -namespace root\cimv2\terminalservices -classname win32_terminalservicesetting).cimclas
smethods['getspecifiedlicenseserverlist'].parameters
name cimtype qualifiers referenceclassname
---- ------- ---------- ------------------
specifiedlslist stringarray {id, out}
not sure how pass these parameters invoke-cimmethod below error
ps c:\users\abhas> invoke-cimmethod -namespace root\cimv2\terminalservices -classname win32_terminalservicesetting -meth
odname getspecifiedlicenseserverlist
invoke-cimmethod : invalid method parameter(s)
@ line:1 char:1
+ invoke-cimmethod -namespace root\cimv2\terminalservices -classname win32_termina ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ categoryinfo : notspecified: (root\cimv2\term...lservicesetting:string) [invoke-cimmethod], cimexceptio
n
+ fullyqualifiederrorid : hresult 0x8004102f,microsoft.management.infrastructure.cimcmdlets.invokecimmethodcommand
appreciated, new ps maybe missing something
$tss=get-cimclass -namespace root\cimv2\terminalservices -classname win32_terminalservicesetting $tss.getspecifiedlicenseserverlist()
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment