Add powershell check

Added check for domain join status to prevent unnecessary execution and
subsequent reboot.