AD Connect and powershell execution policy requirement
Hello,
We recently setup Azure/Entra AD Connect to sync our on prem AD accounts with 365. While the setup went through successfully, and the sync status in 365 was green, I started getting notifications about directory sync being paused. Then in the 365 admin there is a warning about directory sync not being completed after some period.
Looking in the Application Event log on our sync server, I saw Event 905’s – Directory Synchronization:
Scheduler::SchedulerThreadMain : An error occured and scheduler run failed to perform all operation.
System.Management.Automation.CmdletInvocationException: File C:Program FilesMicrosoft Azure AD SyncExtensionsAADConnector.psm1 cannot be loaded because running scripts is disabled on this system….
I changed the Powershell execution policy to RemoteSigned (from the default of Restricted), and that cleared up errors in event log, and synching seemed to start working normally.
So my question is — Do I really need to have the PS executionpolicy on RemoteSigned machine wide for Connect to function properly? I checked the properties of the Powershell module referenced in the error message, AADConnector.psm1, and it not marked as blocked.
Thanks
Hello, We recently setup Azure/Entra AD Connect to sync our on prem AD accounts with 365. While the setup went through successfully, and the sync status in 365 was green, I started getting notifications about directory sync being paused. Then in the 365 admin there is a warning about directory sync not being completed after some period. Looking in the Application Event log on our sync server, I saw Event 905’s – Directory Synchronization: Scheduler::SchedulerThreadMain : An error occured and scheduler run failed to perform all operation. System.Management.Automation.CmdletInvocationException: File C:Program FilesMicrosoft Azure AD SyncExtensionsAADConnector.psm1 cannot be loaded because running scripts is disabled on this system…. I changed the Powershell execution policy to RemoteSigned (from the default of Restricted), and that cleared up errors in event log, and synching seemed to start working normally. So my question is — Do I really need to have the PS executionpolicy on RemoteSigned machine wide for Connect to function properly? I checked the properties of the Powershell module referenced in the error message, AADConnector.psm1, and it not marked as blocked. Thanks Read More