WMIC : where statement combined with a wildcard
Hi PDQ team,
recently, I have created a package to start/stop all Citrix services using WMIC command with a wildcard.
All have been tested before creating the package:
wmic service where "DisplayName like '%Citrix%' AND State = 'Running'" call stopservice
wmic service where "DisplayName like '%Citrix%'" call startservice
When sending the command to the remote machine using PDQ inventoryCommand tool, it works.
Deploying same from PDQ deploy package does not work with success code :
C:\Windows\AdminArsenal\PDQDeployRunner\service-1\exec>wmic service where "DisplayName like '' AND State = 'Running'" call stopservice
No Instance(s) Available.
As you can see above the '%Citrix%' wildcard was not passed over.
Can you please advise how to fix my script, so the wildcard does not get discarded?