What this script will do:
1) It will check connection to 2 DNS servers listed in script header section.
2) If DNS Check is OK, it will check DNS settings of your machine network adatpers against the IP addresses listed in script header section. If not match, it will prompt the user & try to change the DNS settings. If you have multiple network adapters it will ask for each adapter.
3) If the DNS settings is not changed, the script will show errors for Administrator permission and exits.
4) It will ask for user approval and then it will join to domain.
5) If domain join is succeed, it will ask the user to migrate current user's profile to new domain user's profile.
6) If the user choose to migrate current profile, the current user's SID and new domain user's SID are backup to txt file in user's
home directory.
7) After that it will prompt the user to restart the computer.
Note:
Supported from powershell v2.0. Tested on Windows7, Server2008R2 and Windows 10 machines.
If running script is disabled on this system.." error occurrs, you need to change the execution policy in powershell as below.
Open the elevated powershell console and type Set-ExecutionPolicy Unrestricted
Figure-1: Permission error & DNS Servers connection error
Figure-2: user1 join to domain
Figure-3: Restart the computer and Domain User test1 logged in
On win 10 after run script successful and restart. When login with user domain. It sign out and go back login screen. Can you fix it. Thank you!
ReplyDelete