UI Path Active Directory Group Integration -Orchestrator

Hi Folks,

I am referring below mentioned examples for developing script in powershell on automatic adding users to orchestrator.

While I am exploring- Sync-UiPathADUsers.ps1 (https://github.com/UiPath/orchestrator-powershell/blob/master/Examples/Sync-UiPathADUsers.ps1).
When I am trying to filter out available ad-group, the error is showing as active directory service is not running.

Also if anybody is having any information about powershell scripts to how add user in orchestartor automatically ??