I know how to click on the Network tab in Windows Explorer and access Active Directory with the GUI but what I need to do requires me to access many many user objects and I could do everything by hand but that's way too tedious. I was going to write a simple batch script using dsquery user but using dsquery requires me to install certain administrative tools from Microsoft which requires administrative privileges. I DO have the ability to create an elevated CMD but I can not install most things without administrative privileges. Since I can do it through a GUI, I assume it is possible to do through scripting. My last resort is to write a vbs script that controls the cursor and keyboard to do it automatically but I don't wish to do that.

Is it possible for me to query the Active Directory with a script?

  • Speak with your IT staff about getting RSAT installed or have them provide you with the information you need. – CConard96 Apr 9 '17 at 19:44
  • Totally possible but I don't need all of them. That would be more permissions than they want me to have. I already have all of the permissions to do this, I was just wondering if there was a more accessible method. – Neo Scott Apr 9 '17 at 22:28
  • Check for PowerShell solutions is you cannot get the AD commands, etc. from RSAT installed onto the machine. Otherwise, look into copying over executable files from a different machine and see if you can copy over to your machine. CD to the directory you place these (e.g. a folder on your desktop) and then give it a whirl from command line. So like that and look into PowerShell commands. You automatically have READ access to AD by default if I recall correctly so you should be able to see everything unless security has been setup otherwise in a non-default configuration. – Pimp Juice IT Apr 11 '17 at 15:15
  • Thank you @ModeratorImpersonator ! I experimented with your ideas and I actually found a solution that I will write up in an answer ASAP. I will include your solutions as well. – Neo Scott Apr 11 '17 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.