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 (orchestrator-powershell/Sync-UiPathADUsers.ps1 at master · UiPath/orchestrator-powershell · GitHub).
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 ??