Skip to content

Instantly share code, notes, and snippets.

@JustinGrote
Created December 11, 2015 18:56
Show Gist options
  • Save JustinGrote/f32c2785b013b105566b to your computer and use it in GitHub Desktop.
Save JustinGrote/f32c2785b013b105566b to your computer and use it in GitHub Desktop.
Start-AADFullPasswordSync
$adConnector = (get-addomain).dnsroot
$aadConnector = (get-adsyncconnector | where {$_.subtype -match "Windows Azure Active Directory"})[0].name
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment