Use NPS to setup RADIUS authentication on supported devices
Make sure to pre-configure the following:
C:\admin\NPS\Backup\
exists on primary server$NPSDestServer
is configured to the FQDN of your secondary serverC:\admin\NPS\
exists on the secondary serverPlace the following script at C:\admin\NPS\syncNPS.ps1
on the primary server.
Optionally, use Event Scheduler to run the script every time the NPS config is updated.
$date = get-date -Format yyyy_MM_dd # Get date
$NPSDestServer = "DC2.example.com" # Destination Server
Export-NpsConfiguration -Path C:\admin\NPS\Backup\NPSConfig_$date.xml # Export NPS config from local server
Copy-Item -path C:\admin\NPS\Backup\NPSConfig_$date.xml -destination \\$NPSDestServer\C$\admin\NPS\NPSConfig.xml # Copy config to destination server
Invoke-Command -ComputerName $NPSDestServer -ScriptBlock {Export-NPSConfiguration -Path C:\admin\NPS\BackupNPSConfig.xml} # Backup remote server existing config
Invoke-Command -ComputerName $NPSDestServer -ScriptBlock {Import-NPSConfiguration -Path C:\admin\NPS\NPSConfig.xml} # Import new config on remote server