Anyone use DSquery successfully with bigfix?

I have a small batch file doing a dsquery on the local computer, and it outputs computer name and OU membership to a text file… Works perfectly when run locally by the user who is a local admin. Comes up empty as non-admin. I was hoping bigfix could run it as a current user (and we elevate the use of that tool via group policy for regular users). Not working though…
Any other way I can spit out machine name + OU membership of a specific PC into a text file locally ?

Does the “Active Directory Path” property not grab that information already?

yes it does… Long story short, another install from someone else in my group requires reading a text file on each target machine that has that info (name and ou membership). It’s easy to output with a batch file locally, but I can’t get that to work via system account or RaCu…

How else can I do that… Spit out a text file to each PC with the Bigfix compouter name and retrieved property for AD path ?

You could do it really easily without the batch file but with action script:

appendfile {distinguished name of local computer of active directory}
appendfile {computer name}
delete C:\Temp\ActiveDirectory.txt
copy __appendfile C:\Temp\ActiveDirectory.txt

CN=PC0040521,OU=Desktops,DC=domain,DC=job,DC=com
PC0040521

1 Like

Perfect !! thanks !!!

Be sure to use the script I just posted.

I noticed it changed as I was greedily copying it, thanks again, very helpful!!!