AD Gather Script Instructions

This guide will walk through the requirements and steps to successfully generate documentation using Documentation as a Service.

Pre-Requesites

  • Powershell version 5.1
  • Machine with membership in a domain in the forest to document
  • Run on a Windows Server 2012 R2 or later domain controller
    • ADDS and DNS roles (and management tools) required for full functionality
    • NOT FULLY VERIFIED: This should also be able to run from a Windows 10 workstation or WS2012 R2+ server with the right domain membership, credentials, and tools
  • AD Powershell module
    • Installed by default with ADDS administrative tools as part of the Remote Server Administration Tools (RSAT)
    • RSAT is now a Feature on Demand tool in Windows 10: https://docs.microsoft.com/en-us/windows-server/remote/remote-server-administration-tools
  • DNS PowerShell module
    • Installed by default with DNS administrative tools as part of the Remote Server Administration Tools (RSAT)
    • RSAT is now a Feature on Demand tool in Windows 10: https://docs.microsoft.com/en-us/windows-server/remote/remote-server-administration-tools
  • Credentials with read access or higher to an Active Directory forest
    • Note: Some information in Active Directory is not fully readable without administrative privileges

Downloading the latest Gather Script

  • Open a Browser and navigate to https://DocumentationAsCode.com
  • Log in with your Softchoice account
  • On the services dashboard, under Documentation as Code, select AD
  • Click the link to download the latest version of the gather script - it will be a zip file
  • Open your downloads folder and extract Get-ADResources.zip to a new folder on your C: drive
    • Make sure to save the gather script somewhere you can easily find it
    • If you are downloading the script on a Softchoice or BYOD machine, either download from a client-provided machine or copy from your machine to a client-identified one

Running the gather script

  • Use a machine with the appropriate tools and level of access
    • Note: The DNS modules, in particular, will not work on a machine that is not domain-joined due to zone transfer restrictions on AD-integrated DNS
    • If needed, copy to a domain controller or a workstation with the appropriate management tools and PowerShell modules installed
  • Browse to where you saved the gather script
  • Right-click on the file and select "Run with Powershell", If you don't have this prompt, open the file with PowerShell ISE and run the script
    • If you get a security warning, click open. Optionally, you can uncheck the "Always ask before opening this file" box to ignore this warning in the future
  • The script will use your current credentials; use credentials for an account that has access to the environment you will document
  • Navigate to the output folder for the JSON file
    • Note: The default name and path of the JSON file is C:\dac\ADDS.json
    • Note: You may need to copy this from the customer machine to your local workstation to complete the next steps.

Generating Documentation

  • Return to https://DocumentationAsCode.com
  • Login with your Softchoice account
  • On the services dashboard, under Documentation as Code, select "AD"
  • Under Generate Reports:
    • Enter the customer's name
    • Enter your name
    • Click the "Browse" button and navigate to the JSON file that the script created or where you saved it if you copied it to another machine.
  • Click Generate Document
  • You'll see a notification that the file has been uploaded and will be delivered shortly
  • Check your email for the documentation, coming from dac@softchoice.com
    • Note: Check your Other or Junk folders if you do not recieve your document within 5 minutes
  • Click the Download Document button in the email to download your documentation
    • Note: By default, the file will automatically save and download to the root of your largest fixed disk volume

Common Errors/Issues

  • Get-ADForest : The term 'Get-ADForest' is not recognized...
    • Install the RSAT-ADDS management tools
  • Get-DNSServer : The term 'Get-DNSServer' is not recognized...
    • Install the RSAT-DNS management tools
  • Generated outputs are for the wrong (or an unexpected) Active Directory environment
    • Verify the machine on which you have run the gather script is joined to the Active Directory environment you wish to document