/build/static/layout/Breadcrumb_cap_w.png

Custom Inventory Rule not working

Can someone tell me why this custom inventory rule is not working? 

ShellCommandTextReturn(cmd /c dism /online /get-featureinfo /featurename:WCF-HTTP-Activation | findstr /i "State")

I have tried it with both the cmd /c and without.  If I open a command prompt on a computer and just copy and past the dism command in, it runs without issue even in an unelevated command prompt.  I verified all Windows operating systems are selected as well.

Thanks so much.

0 Comments   [ + ] Show comments

Answers (1)

Posted by: five. 6 years ago
Second Degree Green Belt
0
I wonder if it's related to the 32/64 bit problems that Kace sometimes has. Try this.
ShellCommandTextReturn(cmd.exe /c if defined ProgramFiles(x86) (C:\windows\sysnative\dism.exe /online /get-featureinfo /featurename:WCF-HTTP-Activation | findstr /i "State") else (dism.exe /online /get-featureinfo /featurename:WCF-HTTP-Activation | findstr /i "State")

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ