< Back

Start-ADSync

Sat Jan 18, 2020 4:59 pm

NAME Start-ADSync



SYNOPSIS

Starts an AD sync to Azure AD on the remote server





SYNTAX

Start-ADSync [-ComputerName] <String> [[-modulePath] <String>] [[-policyType] <String>] [-ErrorLog] [[-LogFile]

<String>] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

When a sync to Azure AD is required in a script, then this function can be used to remotely start the sync

to Azure AD. Specify the policy type (delta or intial) and the module path (if the directory is not default)





PARAMETERS

-ComputerName <String>

Specify the AAD Connect Server



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-modulePath <String>

Specifiy the AAD Connect Module Path on the AAD Connect Server



Required? false

Position? 2

Default value C:\\Program Files\\Microsoft Azure AD Sync\\Bin\\ADSync\\ADSync.psd1

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-policyType <String>

Specifiy the policy type that needs to sync



Required? false

Position? 3

Default value Delta

Accept pipeline input? false

Accept wildcard characters? false



-ErrorLog [<SwitchParameter>]

Switch to turn on Error logging



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-LogFile <String>



Required? false

Position? 4

Default value .\\Force-ADSync.log

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\Scripts>Start-ADSync -ComputerName Server01



PSComputerName RunspaceId Result

-------------- ---------- ------

Server01 d5490783-7f1f-46bb-aa97-fa8d4cabdd32 Success



Successfully started the AD Sync Cycle on target Server01











RELATED LINKS