AzureADConnectSync.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<#PSScriptInfo
  
.VERSION 1.0.0
 
.GUID 46240b62-74f7-47b4-98a6-3a492945bbf5
  
.DESCRIPTION Azure AD Connect Sync: Use this script to run azure ad connect from azure automation account, Please test before using it in production
  
.AUTHOR Amarnath Rajendran
  
.Company Tech Genius
  
.TAGS Azure AAD ADConnect SYNc
  
#>







param (
[Parameter(Mandatory=$true)]
[string] $SyncType)

If ($SyncType="Delta")
{Start-ADSyncSyncCycle -PolicyType Delta
}

Else 
{
Start-ADSyncSyncCycle -PolicyType Initial 
}