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

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2