There is a process of migrating workstations and user accounts from the source to the target domain. This process is accompanied by renaming of user accounts (the prefix is added, that is, it was "username", became xxx_username, where xxx_ is a constant, and "username" is the user accounts that was last logged on to this workstation).
It is required to develop a script (ps1, bat), which after rebooting the workstation will automatically change the domain and account of the last logged-in user on the login screen in windows 10.
The script does not restart the computer. The script only changes the domain and username. The script is executed once at the start of the operating system.
domain level: Windows 2016
OS on user's workstation: Windows 10
domain1 \ username -> domain2 \ xxx_username, where xxx is a constant.
hi there, I'm a system administrator and regularly write powershell and bat scenarios. I currently manage an AD system and 500 users so let'me take care this job. thanks!