The need to change which server is the primary server in an AD FS farm only exists in an AD FS environment which is configured to use a Windows Internal Database to store the configuration. If the AD FS farm is configured to use a SQL database is used then all servers are “primary”.
Note that the primary server must be accesible via HTTP on port 80 from the secondary server(s).
On the server you want to configure as the Primary server open an PowerShell prompt and enter:
1 |
Set-AdfsSyncProperties -Role PrimaryComputer |
On the previous primary server which should now become a secondary server enter the PowerShell command:
1 |
Set-AdfsSyncProperties -Role SecondaryComputer -PrimaryComputerName FQDN.Primary.Server |
To check the status enter the cmdlet:
1 |
Get-AdfsSyncProperties |
The output displayed depends on which server you ran the cmdlet. The primary server should display:
1 2 3 |
Role ---- PrimaryComputer |
The secondary server will display a little bit more information:
1 2 3 4 5 6 7 |
LastSyncFromPrimaryComputerName : FQDN primary server LastSyncStatus : 0 LastSyncTime : 22-1-2019 09:18:19 PollDuration : 300 PrimaryComputerName : FQDN primary server PrimaryComputerPort : 80 Role : SecondaryComputer |