Skip to content
InvardiaInvardia
Why InvardiaProductsFeaturesPricingCommunity
Docs
All documentation
Product documentationPIM ManagerSecurityInsight
SettingsPIM Manager settingsSecurityInsight settingsEntra Policy Suite settings
ScriptsPIM Manager scriptsSecurityInsight scriptsEntra Policy Suite scriptsInvardia scripts
Error codesPIM Manager error codesSecurityInsight error codes
API and MCPPIM Manager APIPIM Manager MCP toolsSecurityInsight APISecurityInsight MCP tools
SecurityPIM Manager security packSecurityInsight security packEntra Policy Suite security pack
Network and designPIM Manager network guidesPIM Manager command wizardNetwork egressDesign your installationCalculate your cost
SupportSetup scriptsRemote support access
Search the docs
SupportAboutContactBook a demoCustomer portalDesign your installationFree Pro trial

Entra Policy Suite scripts

Initialize-EpsHybridWorkerAd

Documentation out of date

The documentation below was written for a different copy of this script than the one published now. Read the script itself before you run it, or ask support@invardia.com.

  • the .doc.json names no sha256 of the script it documents
  • the .doc.json is for version 2.0.0, the published script is 2.0.107

The published script's own summary: Delegates the Entra Policy Suite hybrid worker in Active Directory: the right to write EXACTLY the tag attributes you choose on user (and, for device tags, computer) objects - nothing else (DESIGN §6). Run once by a domain admin on a domain machine.

Purpose

Gives the hybrid worker the right to write exactly the tag attributes you choose on user objects (and computer objects for device tags) anywhere in the domain - one inheritable ACE per attribute and object class at the domain root, granted to the group <gMSA>-PermissionGroup (the gMSA its only member), nothing else. Plan first: without -Apply nothing is changed; with -Apply every change is read back.

When to run it

Once before the worker is installed, and again when a tag type moves to another attribute.

Who may run it

KindRoleScopeWhy
othera domain adminthe domain root (and AdminSDHolder with -IncludeProtectedAccounts)makes the permission group if missing and adds the ACEs

What it changes

WhereActionWhatPermission / roleScopeWhyUndo
Active Directorycreate<gMSA>-PermissionGroup (when missing), in the gMSA's container, the gMSA its only member-one global security groupevery AD right of the worker goes to this group, never to the gMSA (framework HYBRID-AD-1)delete the group after -Remove -Apply
Active Directorygrant<gMSA>-PermissionGroupWriteProperty on each attribute you list, inherited by descendant user (and with -ObjectClasses computer, computer) objectsthe domain rootthe worker writes the tags of AD-synced users (and devices)-Remove -Apply (the same ACEs, removed)
Active Directorygrant<gMSA>-PermissionGroupWriteProperty on the same attributes, on the object itselfCN=AdminSDHolder,CN=System - only with -IncludeProtectedAccountsprotected admin accounts get their tags too (a Tier 0 decision)-Remove -IncludeProtectedAccounts -Apply

What it only reads

  • the gMSA, the schema's attribute ids, the OUs' permissions

Parameters

ParameterRequiredDefaultWhat it does
-Gmsayesthe worker's gMSA (name, or DOMAIN\name$)
-Attributesyesyour tag attributes (extensionAttribute1-15 only) - no default, they differ per customer
-ObjectClassesnouseruser, and computer for device tags
-ProductOunonot used by Entra Policy Suite (it owns no AD objects); the shared parameter of the hybrid worker scripts
-IncludeProtectedAccountsnofalsealso protected admin accounts (AdminSDHolder) - makes the worker Tier 0
-Servernothe domain locatora domain controller
-Applynofalsemake the changes and read them back
-Removenofalseremove the ACEs instead (the group stays)

Preview with -WhatIf

Without -Apply (or with -WhatIf): every ACE it would add or remove and the ones already there.

Undo

Run again with -Remove -Apply.

Network

It connects to: the domain controllers (LDAP)

Download and run

Run these lines in PowerShell: the first downloads the script into the current folder, the second runs it.

Invoke-WebRequest https://invardia.com/support/eps/Initialize-EpsHybridWorkerAd.ps1 -OutFile Initialize-EpsHybridWorkerAd.ps1
.\Initialize-EpsHybridWorkerAd.ps1 -Gmsa <Gmsa> -Attributes <Attributes>

To check the download first, compare its SHA-256 with the published one:

SHA-256 a1814facb242131b3ce96d823d8ed27e4cb8e4ecc11b397aabf86e630f1d2105

Checksums: SHA256SUMS.txt · Version 2.0.107 · Documentation for version 2.0.0

Before you run it, compare the file's SHA-256 with its line in SHA256SUMS.txt.

Every parameter: Get-Help .\Initialize-EpsHybridWorkerAd.ps1 -Full · Source: Initialize-EpsHybridWorkerAd.ps1

Every script, identity and permission for your security review: Entra Policy Suite

InvardiaInvardia

See the risk. Control the access.

Products

PIM ManagerSecurityInsightEntra Policy SuiteAll featuresPricingFree 60-day Pro trialBook a demoWhy Invardia

Docs

DocumentationSearch the docsPIM Manager settingsSecurityInsight settingsPIM network guidesCommand wizardNetwork egressPIM Manager design configuratorSecurityInsight design configuratorDesign your installationCalculate your cost

Company

AboutContactCustomer portalSupportHow support worksHow updates reach youSupport in numbersSetup scriptsRemote support accessContact: info@invardia.com

Legal

Terms of saleLicence termsData processingPrivacyCookiesCompany information
© 2026 Invardia – a brand of 2LINKIT, founded and owned by Morten Knudsen · Strandvejen 21A, 6000 Kolding, Denmark · VAT DK39208032 · Contact: info@invardia.com