Custom Inventory Rule with Powershell not finding results
Hello!
I'm trying to create a CIR which will eventually be used with a report to identify all local users on a workstation, except a few select expected users. However, when the rule is created, it is turning up no results. I haven't really worked a lot with CIRs so my code may be off so I was hoping to get some great insight about the process. Any help would be greatly appreciated.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
vigasi
1 year ago
Hello- Here is what I currently use. I try to keep it simple. If it works, then I tweak it.
ShellCommandTextReturn(c:\windows\sysnative\WindowsPowerShell\v1.0\powershell.exe Get-LocalUser)
Have fun!
Comments:
-
Thanks! That did solve the issue of it not returning results at all. I was missing the "Sysnative" alias. Now, the question is, how do I get it to exclude certain results. When I add in the "Where-object" cmdlt, it no longer runs. - BebopFloyd 1 year ago