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

Find-PimStrayTestObjects

Find objects left behind by test runs

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

Purpose

Finds groups and administrative units left behind by test runs (names starting with a test marker) in a tenant, and reports the directory roles they hold and who are their members and owners. Read-only: it changes nothing.

When to run it

After live test runs against a tenant, or on a schedule (-FailIfFound) as a sweep. It looks OUTSIDE PIM's own filters on purpose: test objects carry a marker prefix that PIM's filters never match, so drift checks cannot see them. Cleanup is a separate, deliberate act.

Who may run it

KindRoleScopeWhy
otherA Microsoft Graph identity already connected in this PowerShell session (PIM's REST context: tenant, application + certificate, or interactive) with Group.Read.All, AdministrativeUnit.Read.All, RoleManagement.Read.Directory and GroupMember.Read.All -- or a Global Reader / Directory Readers userthe tenantLists marker-prefixed groups and administrative units, the directory role assignments, and the members and owners of each group. Read-only; with no tenant context the script scans nothing and says so.

What it changes

Nothing - it only reads.

What it only reads

  • groups whose display name starts with a marker (id, name, created date, role-assignable)
  • administrative units whose display name starts with a marker
  • directory role assignments (to report the directory role each found group holds)
  • members and owners of each found group

Parameters

ParameterRequiredDefaultWhat it does
-MarkernoPIMCOREENGINE-, PIMTEST-Object-name prefix(es) to look for.
-FailIfFoundnofalseExit 3 when anything is found, so a scheduled run surfaces as a failure. Default: exit 0 (report only).

Preview with -WhatIf

The script is read-only, so -WhatIf changes nothing about the run: it prints 'What if: this script is read-only ...' and then the same report.

Undo

Nothing to undo -- the script changes nothing.

Network

It connects to: login.microsoftonline.com (token), graph.microsoft.com

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