Configuring templates
As mentioned earlier, only the Active Directory Users and Computers MMC Snap-in gives you the ability to copy a user account. With the new Active Directory Administrative Center MMC Snap-in or PowerShell, it isn't possible to copy a user account. However, from Windows Server 2012, you can create a user account with the most common parameters for a specific job role or department configured and use that account as a template. As mentioned earlier, attributes that are copied to the new user account are as follows:
- Group memberships
- Home directories
- Profile settings
- Logon scripts
- Logon hours
- Password settings
- Department name
- Manager
The template user account can be created using PowerShell or either of the MMC Snap-ins. Creating a new user account from the template can be done with the Active Directory Users and Computers MMC Snap-in with the copy option, as mentioned earlier, or using the PowerShell command:
$Template = Get-ADUser -Identity vladimir.stefanovic -Properties Company
New-ADUser -GivenName John -Surname Doe -Name "John Doe" -UserPrincipalName john.doe@mcsacertguide.local -SamAccountName john.doe –AccountPassword (Read-Host –AsSecureString "Enter password") -Enabled $true -Instance $Template