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

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

difference between wuauclt1.exe and wuauclt.exe

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL