Add checks to terminate script if not running in proper environment.

Added checks to ensure that the script is being ran on a domain-joined machine and with a domain account.