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

New-PimHostingPrerequisites

Create the Azure prerequisites of a PIM Manager environment

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

Purpose

Creates, or finds and reuses, what a PIM Manager environment needs in the subscription before the containers are deployed: the resource providers, the resource group, the VNet with its delegated Container Apps subnet, Log Analytics, the container registry (optionally Premium with a private endpoint and a build pool), the image-pull identity, and the SQL server and database with Entra-only sign-in and the SQL admin group. Every step is find-or-create and read back at the end.

When to run it

Normally never by hand: Invoke-PimDeployAll.ps1 runs it as its 'prereq' step. Run it yourself to change an existing environment's prerequisites with the same names, for example to make the registry private (Premium, private endpoint, build pool) or to add the SQL private endpoint before or after a conversion to private. It is part of the PIM Manager release package (it loads the engine's REST libraries next to it): run it from the package folder that Install-Invardia or the guided install downloaded (signed), or, for Community, from the public repository at the release tag.

Who may run it

KindRoleScopeWhy
azureRbacOwner, or Contributor + User Access Administratorthe PIM subscriptionRegisters resource providers, creates the resource group and everything in it, and grants the image-pull identity AcrPull on the registry. Signed in through the browser or the Invardia Support app session (-UseSignedInAccount; no Azure CLI, no modules).
entraRolePrivileged Role Administratorthe tenantCreates the role-assignable SQL admin group (grp-pim-sql-admins) and adds its members.

What it changes

WhereActionWhatPermission / roleScopeWhyUndo
Azure (subscription)updateresource provider registrations: Microsoft.App, Microsoft.ContainerRegistry, Microsoft.OperationalInsights, Microsoft.Network, Microsoft.Sql, Microsoft.Storage, Microsoft.KeyVault, Microsoft.ManagedIdentity, Microsoft.Insightsthe subscriptionA fresh subscription refuses the creates without them.Not needed (a registration costs nothing); unregister in the portal if required.
Azure (the PIM resource group)createthe resource group, the VNet and the Container Apps subnet (delegated to Microsoft.App/environments), the Log Analytics workspace and the container registry (find-or-create; an existing registry is upgraded to the requested SKU, never downgraded)the resource group (-ResourceGroupName)Everything the container deploy assumes exists.Delete the resources (or the resource group) -- only when the environment is removed.
Azure (private networking)createwith -AcrPublicAccess false / -SqlPrivateEndpoint: the private-endpoint subnet, the registry's and SQL server's private endpoints, the privatelink.azurecr.io / privatelink.database.windows.net zones linked to the VNet, and the registry build pool (-AcrAgentPoolName)the resource group or -PrivateDnsResourceGroup (same subscription)A private registry and database are reachable only through private endpoints; the build pool builds images inside the VNet.Delete the private endpoints, zones and build pool.
Azure (network)createwith -InternalRanges and -FirewallIp, in a network the installation made: route table rt-pim (one route per range, next hop VirtualAppliance -> the firewall, BGP route propagation off) attached to the apps subnet (its other settings kept), and the two answers as tags on the resource group (pim-return-ranges, pim-return-firewall) so the nightly updater can report a missing routethe resource group and the apps subnetBehind a hub firewall the replies to your network must go back through the firewall, or they time out.Detach the route table from the subnet, delete rt-pim and remove the two tags.
Azure (identities)grantthe image-pull identity id-pim-<token> (created) gets AcrPull on the registry; with private SQL the SQL identity id-pim-sql-<token> is createdAcrPullthe container registryThe Container Apps pull images with this identity; no registry password is kept.Remove the role assignment and the identity.
Azure SQLcreatethe SQL server (Entra-only authentication, TLS 1.2) and the database PimPlatform (S0 minimum), the connection policy (-SqlConnectionPolicy), the AllowAzureServices rule only when no subnet path exists, and the temporary AllowSetupHost rule for this hostthe resource groupThe PIM store. The setup-host rule is the setup window; Invoke-PimDeployAll removes it at the end of its run.Delete the AllowSetupHost rule when done (standalone run); the server and database hold the data and are never removed by PIM.
Entra IDgrantthe SQL server's Entra admin converges on the role-assignable group grp-pim-sql-admins; members: the environment identities, the SQL identity, the person or identity running the deploy and the Invardia Support app (-SupportAppId)SQL Entra admin (through the group membership)the SQL serverOne admin model for public and private SQL; nobody loses access when the admin moves.Remove members from the group, or set another Entra admin on the SQL server.

What it only reads

  • the subscription (it must be visible to the sign-in and belong to -TenantId)
  • every resource before it is created (find-or-create), and all of them again at the end (=== VERIFY ===)

Parameters

ParameterRequiredDefaultWhat it does
-TenantIdyesThe tenant.
-SubscriptionIdyesThe PIM subscription (must belong to -TenantId).
-TokenyesShort name every default resource name is derived from (rg-automateit-<token>, vnet-pim-<token>, ...); override any name with the parameters below.
-Indexno-1Address-plan index for the <AddressBase>.<Index*8>.0/21 scheme. Give this OR -VnetAddressPrefix + -SubnetAddressPrefix.
-AdminAppIdnoAutomation: the deploy identity's client id (with -AdminCertPem). Customers use -UseSignedInAccount.
-UseSignedInAccountnofalseCreate everything as the person signed in (browser) or the Invardia Support app session. The recommended way.
-AdminSecretnoLegacy automation only: a client secret for -AdminAppId. Not for customer use.
-AdminCertPemnoAutomation: PEM file (key + certificate) of -AdminAppId.
-LocationnoswedencentralThe Azure region.
-SqlServiceObjectivenothe product tier (S3)The database tier. Leave it out for the product tier (S3, 250 GB maximum size). A Standard tier below it (S0, S1, S2) is created as named and pinned, so updates keep it; Basic is never created.
-SqlConnectionPolicynoDefaultDefault, Proxy or Redirect. Proxy when your firewall allows only port 1433 to SQL.
-AcrSkunoBasicBasic, Standard or Premium. Only Premium has network controls (private endpoint, public access off).
-AcrPublicAccessnoDefaultDefault, true or false. false needs Premium, a private-endpoint subnet and a build pool. On an existing registry the private endpoint is added and public access is turned off later (the conversion's -LockRegistry).
-PrivateEndpointSubnetNamenopim-endpointsThe private-endpoint subnet (it cannot be the Container Apps subnet).
-PrivateEndpointSubnetAddressPrefixnoIts address range (a /26 is enough).
-PrivateDnsResourceGroupnoWhere the privatelink zones go (same subscription; default the PIM resource group).
-VnetResourceGroupnothe PIM resource groupThe VNet's own resource group (same subscription): the VNet, its subnets and the private endpoints' subnet are read and created there.
-SqlPublicAccessDisablednofalseWith -SqlPrivateEndpoint: the SQL server is created with public network access disabled (an existing one is switched off once its private endpoint exists) and no firewall rule is written.
-PrivateDnsZoneLinkVnetIdsnoAlso link the installation's own privatelink zones to these VNets (the hub). Never used for central zones.
-InternalRangesno[]With -FirewallIp (both or neither): your internal ranges. Route table rt-pim in the resource group gets one route per range (next hop VirtualAppliance -> -FirewallIp, BGP route propagation off) and is attached to the apps subnet, read back. A refusal is a warning and a network hand-off line, never a stop.
-FirewallIpnoWith -InternalRanges: the hub firewall's private IP, the return route's next hop.
-ReturnRouteHandOffOnlynofalseThe VNet is your own: nothing is written to it; the return route is printed as a network hand-off line.
-PrivateDnsZonesResourceGroupIdnoYour central privatelink zones (a resource group id, any subscription): used, never created or written -- a missing zone stops the step, and no link is made there.
-SqlPrivateEndpointnofalseCreate the SQL server's private endpoint and the privatelink.database.windows.net zone.
-AcrAgentPoolNamenoThe registry build pool (Premium), placed in the private-endpoint subnet.
-AcrAgentPoolCountno0Build agents between builds (0: each build scales the pool to 2 and back to 0).
-AcrAgentPoolTiernoS2S1, S2 or S3 (S2 by default).
-AddressBaseno10.220The /16 the -Index scheme carves from.
-ResourceGroupNamenorg-automateit-<token>Your own resource group name.
-VnetNamenovnet-pim-<token>Your own VNet name.
-SubnetNamenosnet-pim-acaYour own Container Apps subnet name.
-VnetAddressPrefixnoYour VNet range (with -SubnetAddressPrefix).
-SubnetAddressPrefixnoYour Container Apps subnet range (/27 or larger; /24 or /23 recommended).
-AcrNamenoacrpim<token>Your own registry name (letters and digits).
-LogAnalyticsNamenolaw-pim-<token>Your own Log Analytics workspace name.
-SqlServerNamenosql-ait-<token>Your own SQL server name (without .database.windows.net).
-SkipSqlnofalseCreate no SQL server (a central store is used).
-SqlAdminGroupNamenogrp-pim-sql-adminsThe SQL admin group.
-UpdateJobNamenoca-pim-updateThe name of the update job whose identity the SQL admin group setup looks up. Change it only when your installation uses its own resource names (the names are recorded per installation, so renames keep working).
-SupportAppIdnoThe Invardia Support app's application id, added to the SQL admin group (alias -TroubleshootingAppId).
-SkipSqlAdminGroupnofalseKeep a single-principal SQL admin instead of the group.
-SetupHostIpnoThis host's public IP for the temporary AllowSetupHost rule; without it the IP is read from api.ipify.org (said on screen).

Preview with -WhatIf

Checks the names, the address plan and the options from the parameters, prints the summary (subscription, location, VNet / subnet, registry / workspace) and one 'What if: would ...' line per step (providers, resource group, VNet, Log Analytics, registry, private endpoints, pull identity with AcrPull, SQL server and database, SQL admin group), then 'RESULT: WHAT-IF'. Nothing is signed in to and nothing is created.

Undo

The resources are find-or-create and hold the environment; remove them only together with the environment (delete the resource group, the SQL admin group and the sign-in app registration). After a standalone run, delete the temporary AllowSetupHost SQL firewall rule once the deploy's SQL steps are done.

Network

It connects to: login.microsoftonline.com (sign-in), management.azure.com (Azure Resource Manager), graph.microsoft.com (the SQL admin group), api.ipify.org (only without -SetupHostIp and only when SQL is created with a public endpoint)

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