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

PIM Manager scripts

Set-PimHybridWorkerPeering

PIM for Active Directory: show, cut or restore the hybrid worker's network reach

Part of the PIM Manager release - not a standalone download; it runs via the product's own install command or the updater.

Purpose

Shows, cuts or restores the hybrid worker's network reach by turning its VNet peerings off and on, without deleting anything.

When to run it

-State Show to check the Azure VM worker's peerings after the build; -State Disconnected to stop the worker acting at once (its AD jobs then fail visibly); -State Connected to restore. Not used for an Azure Arc worker (its network is yours).

Who may run it

KindRoleScopeWhy
azureRbacNetwork Contributorthe worker VNet and every VNet it is peered withupdates allowVirtualNetworkAccess on both sides of each peering. -State Show needs only Reader.

What it changes

WhereActionWhatPermission / roleScopeWhyUndo
VNet peerings of the worker VNet (both sides)updateallowVirtualNetworkAccess = false (Disconnected) or true (Connected); the peerings stayan isolation switch that keeps the topologyrun it again with the other -State
the worker-side peering to the hub (-UseRemoteGateways / -AllowForwardedTraffic)updateuseRemoteGateways = true / allowForwardedTraffic = true; allowGatewayTransit = true on the hub side ONLY when PIM created that peering ('<hub>-to-pimhybridwrk') -- otherwise the hub owner's step is printed and useRemoteGateways stays offdomain controllers reached through the hub's VPN / ExpressRoute gatewayset the flags back on the peerings in the portal, or Remove-PimHybridWorker.ps1

What it only reads

  • the subscription's tenant
  • the peerings of the worker VNet and of each remote VNet

Parameters

ParameterRequiredDefaultWhat it does
-SubscriptionIdyesThe worker's subscription.
-TenantIdyesThe tenant; the script refuses a subscription in another one.
-StateyesShow, Disconnected or Connected.
-ResourceGroupnorg-pimhybridwrkThe worker's resource group.
-VnetNamenovnet-pimhybridwrkThe worker VNet.
-UseRemoteGatewaysnofalseWith -State Connected: the worker-side peering to -GatewayVnetId uses the hub's VPN / ExpressRoute gateway. Checked first: the hub has a gateway; the hub side allows gateway transit (set by PIM only on a hub-side peering PIM created, otherwise printed for the hub owner).
-AllowForwardedTrafficnofalseWith -State Connected: the worker-side peering(s) accept traffic the hub forwards (to -GatewayVnetId only when given).
-GatewayVnetIdnoThe hub VNet with the gateway (required with -UseRemoteGateways).

Preview with -WhatIf

Prints each peering and the access change it would make; changes nothing. -State Show is read-only by itself.

Undo

Run it again with the other -State; nothing is ever deleted.

Network

It connects to: management.azure.com (ARM REST) and login.microsoftonline.com -- browser sign-in or an Invardia support session; no Azure CLI, no PowerShell module

How it runs

Part of the PIM Manager release - not a standalone download; it runs via the product's own install command or the updater.

Release 3.0.70

Every script, identity and permission for your security review: PIM Manager

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