Category: Active Directory

Active Directory: Move FSMO roles with PowerShell

Martin 15/03/2018

When moving FSMO roles the old fashioned way, you use MMC and move the roles each individually, it takes a little time, but it’s somewhat troublesome. BUT, this can be achieved much quicker with Powershell 🙂 Here is how to transfer all 5 FSMO roles: Move-ADDirectoryServerOperationMasterRole -Identity DC01 –OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster Where “DC01” above is the TARGET DC. Check with netdom command afterwards: Done!

Read More Active Directory: Move FSMO roles with PowerShell

Active Directory: Changing home folder servername

Martin 04/07/2017

When migrating filservers and you are using the “Home Folder” setting of an AD user’s object like here:   From: To: It would be great just to edit all objects in bulk, with this script, it is possible:  

Remember servername is CASE SENSITIVE! So if the oldserver is all with small letters, and you type them with CAPS, it will change nothing 🙂 Credits go to: https://www.experts-exchange.com/members/justinyeung.html  

Read More Active Directory: Changing home folder servername

NTFRS replication is going AWOL

Martin 14/09/2016

Two domain controllers have perfect replication via Active Directory, but the “File Replication Service” eventlogs, shows many errors and the NETLOGON share is missing on both domain controllers, which will give user login problems and Active Directory tools cannot be opened, claiming that access is denied. Event log on both servers: Using this article – even though it’s old: https://support.microsoft.com/en-us/kb/290762 We can read this: Attempt nonauthoritative restores only after you discover FRS dependencies and you… NTFRS replication is going AWOL

Read More NTFRS replication is going AWOL

Exchange migrated, ActiveSync not working as supposed

Martin 02/10/2015

After a complete Exchange 2013 migration, everything works, but some users are complaining, that their mobile devices are not being updated with e-mails anymore. You try to delete their account and add it again, all is good when doing that, but the Inbox stays empty! This is mostly common to the Active Directory permissions, not being inherited on the users object, so try this (On server 2012 R2, but looks almost the same on 2008… Exchange migrated, ActiveSync not working as supposed

Read More Exchange migrated, ActiveSync not working as supposed

Change UPN (based on Primary Email) based on SMTP proxy address

Martin 24/09/2015

During an Exchange migration, where the users have several domains spread among them, I needed to find a script that looks into the SMTP Proxyaddress of the user object, and changes the UPN for that user to match the ProxyAddress. I did’nt have to search long, before I found this page: Change UPN (based on Primary Email) based on SMTP: in proxy addresses Copy the following into a .ps1 file and run it directly from… Change UPN (based on Primary Email) based on SMTP proxy address

Read More Change UPN (based on Primary Email) based on SMTP proxy address

Create a new UPN and use it as default for all your users

Martin 21/09/2015

If you in ex. want to enable Autodiscover for your mail clients, they need to have their e-mail as their username, and there for the UPN (Universal principal name), has to be changed from domain\user to user@domain.com. Here is how to do this in Active Directory, and then via PowerShell, change it on all the already created, user accounts. Open Active Directory Domains and Trusts Right-click “Active Directory Domains and Trusts and choose “Properties” Now… Create a new UPN and use it as default for all your users

Read More Create a new UPN and use it as default for all your users