I am looking to have a custom inventory rule that will list all the Active Directory Groups that the computers are members of.  I have the AD Distinguished Name rule, but don't know how to get the groups.  Thanks for any help!!!
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author


Please log in to comment

Community Chosen Answer

1
Answered 02/11/2016 by: SMal.tmcc
Red Belt

Please log in to comment

Answers

0
I answered one just like this a few months ago but cannot find it

CIR's run as system so you cannot get user data.

If all you need is the machine groups use
ShellCommandTextReturn(cmd /c gpresult /r /scope:computer)
If you need user data also you will need to create a kscript that runs a current user and echo the results to a file and then a cir to read that file.

If you need this let me know still have the script I made for the last question I answered
Answered 02/11/2016 by: SMal.tmcc
Red Belt

  • The output is perfect when I run gpresult /r /scope /computer
    from my command prompt as administrator. But when I use
    ShellCommandTextReturn(cmd /c gpresult /r /scope:computer)
    in KACE, I still get the same output.
    INFO: The user "CULPEPERCOUNTY\IT2244$" does not have RSOP data.
    [string]

    Thanks again for all your help!
  • Thank you so much! It worked perfectly for me as well!!!
Please log in to comment
Answer this question or Comment on this question for clarity