[PSM] - Unable to run WMIC command - No Instances Found
Symptom
When changing the PSM Users to Domain Users
https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PAS%20INST/Optional-Moving-the-PSMConnec-and-PSMAdminConnect-users-to-your-Domain.htm
Running the first command succeeds.
wmic.exe /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSPermissionsSetting WHERE (TerminalName="RDP-Tcp") CALL AddAccount "DOMAINNAME\PSMAdminConnect",0
However, running the 2nd command fails with "No Instances Found"
wmic.exe /namespace:\\root\cimv2\TerminalServices PATH Win32_TSAccount WHERE "TerminalName='RDP-Tcp' AND AccountName='DOMAINNAME\\PSMAdminConnect'" CALL ModifyPermissions TRUE,4
Environment
11.5;11.7 PSM
Cause
The WMIC command fails when using the fully qualified domain name (FQDN). The FQDN needs to use the NETBIOS for the Domain name.
Resolution
When replacing "DOMAINANME\\PSMAdminConnect" with the domain credentials, use the NETBIOS domain name
Failure
wmic.exe /namespace:\\root\cimv2\TerminalServices PATH Win32_TSAccount WHERE "TerminalName='RDP-Tcp' AND AccountName='contoso.com\\PSMAdminConnect'" CALL ModifyPermissions TRUE,4
Success
wmic.exe /namespace:\\root\cimv2\TerminalServices PATH Win32_TSAccount WHERE "TerminalName='RDP-Tcp' AND AccountName='contoso\\PSMAdminConnect'" CALL ModifyPermissions TRUE,4