Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure AD Sync ScriptBox Item
Summary
Use this script to trigger a full password sync on Azure AD Sync.
To use this script, replace the names of the connectors with the values from your environment.
Note: This requires PowerShell Version 4 to run. If you are using 2008 R2 download the latest Management Framework.
Script Code
001
002 003 004 005 006 007 008 009 010 011 012 013 |
$adConnector = "fabrikam.com"
$aadConnector = "aaddocteam.onmicrosoft.com - AAD"
Import-Module adsync $c = Get-ADSyncConnector -Name $adConnector $p = New-Object Microsoft.IdentityManagement.PowerShell.ObjectModel.ConfigurationParameter "Microsoft.Synchronize.ForceFullPasswordSync", String, ConnectorGlobal, $null, $null, $null $p.Value = 1 $c.GlobalParameters.Remove($p.Name) $c.GlobalParameters.Add($p) $c = Add-ADSyncConnector -Connector $c
Set-ADSyncAADPasswordSyncConfiguration -SourceConnector $adConnector -TargetConnector $aadConnector -Enable $false Set-ADSyncAADPasswordSyncConfiguration -SourceConnector $adConnector -TargetConnector $aadConnector -Enable $true |
Note
For feedback, click here.