Awesome script! Wondering if you could help me figure out an enhancement. dsregcmd /join requires Internet access in the context of the system account. Our environment requires proxy authentication, which is usually done by logging into a system and opening a web browser (initiating Internet access in the context of a domain user account via sso). Once authenticated, any account on the machine (including system account) will have Internet access. Is there something we could add to your script that would initiate a connection to a website like Microsoft in the context of a domain user account prior to running the sections of your script that depend on Internet access?