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

SecurityInsight scripts

Stop-SIRunAndUpdate

Stop the running pipeline run, then update

Purpose

Container install: cancels the running pipeline run the product's way, waits until the stop is confirmed (the run reads Cancelled and none of its jobs executes), and only then starts the updater once and reads the installed version back. Plan by default; -Apply acts.

When to run it

When a run that must not finish (a hang, a run on an older release) is in the way of an update. Never cancel a run and start the updater at the same moment: the updater then finds the run still going and steps aside.

Who may run it

KindRoleScopeWhy
azureRbacContributor (or Container Apps Contributor)the install's resource groupto read the jobs and their executions and to start caj-si-flow (the cancel) and caj-si-updater once each
azureRbacKey Vault Secrets User (optional)the install's Key Vaultto read the updater's last manifest check (the version the install's ring serves); without it the plan says it is not known
sqla reader / writer of the Pro database (optional)the Pro databaseto read the run record (the run reads Cancelled) and to write the audit rows; a database that does not answer from here is never opened -- the stop is then confirmed from the jobs' executions
sqlthe Invardia Support app's support grant (setup level, at most 1 hour; only in a Support session at an install where support holds no standing database admin)the install's product databasesto write each audit row: the grant is opened just before the row, read back, and closed again right after; when it cannot be opened the row is not written (a warning) and the stop and the update go on

What it changes

WhereActionWhatPermission / roleScopeWhyUndo
Container Apps jobscreateone execution of caj-si-flow with SI_FLOW_CANCEL=1 (the product's cancel of the running run: marked Cancelled, its executions stopped, the lock released)the install's resource groupstop the running pipeline runa cancelled run is final; the next run starts on the pipeline's next wake-up or schedule
Container Apps jobscreateone execution of caj-si-updater (update now), only after the stop is confirmedthe install's resource groupinstall the release the install's ring servesthe updater restores the previous release itself when a roll fails
Pro SQL databasecreatetwo audit rows: job.flowrun.cancel and job.execution.startthe Pro database (when it answers from where the script runs)who stopped the run and started the update, and whynone: the audit trail is append-only

What it only reads

  • the jobs, their executions and the updater's tags (si-installed, si-update-waits)
  • the last pipeline run record
  • the updater's update state (its last manifest check)

Parameters

ParameterRequiredDefaultWhat it does
-ReasonyesWhy the run is stopped (required): kept with the cancelled run and on the audit trail.
-ResourceGroupNameno$(if ($global:SI_Bootstrap_ResourceGroupName) { [string]$global:SI_Bootstrap_ResourceGroupName } else { '' })
-SubscriptionIdno$(if ($global:SI_Bootstrap_SubscriptionId) { [string]$global:SI_Bootstrap_SubscriptionId } else { [string]$global:SI_AzSubscriptionId })
-RunIdno''Only this run (its id, as Operations > Jobs shows it). Default: the run that is running now. A run that is not running is never touched; when another run is running, nothing is done.
-SkipUpdatenoOnly stop the run (steps 0-2).
-TimeoutMinutesno30How long the stop may take to be confirmed (default 30, said in the log). Past it nothing more is started.
-PollSecondsno30
-Applyno

Preview with -WhatIf

The plan: the running run (id, trigger, step, age), every running execution, the installed version against the version the ring serves, and what would happen; nothing is started (same as without -Apply).

Undo

A cancelled run is not resumed; start the pipeline again from Operations > Jobs when needed. An update is not rolled back by this script.

Network

It connects to: *.blob.core.windows.net, *.queue.core.windows.net, *.table.core.windows.net, *.vault.azure.net, 169.254.169.254, api.loganalytics, api.loganalytics.io, api.msrc.microsoft.com, api.security.microsoft.com, api.securitycenter.microsoft.com, api.securityplatform.microsoft.com, database.windows.net, entra.microsoft.com, graph.microsoft.com, invardia.com, licenses.nuget.org, login.microsoftonline.com, management.azure.com, monitor.azure.com, nvd.nist.gov, outlook.office.com, outlook.office365.com, portal.invardia.com, storage.azure.com, vault.azure.net, www.powershellgallery.com

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/si/Stop-SIRunAndUpdate.ps1 -OutFile Stop-SIRunAndUpdate.ps1
.\Stop-SIRunAndUpdate.ps1 -Reason <Reason>

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

SHA-256 7e2ada7a574b08758a6dd8bcd7c6529fa10460f634c225b3e4ee1b084baa43ad

Checksums: SHA256SUMS.txt · Version 3.0.79

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

Every parameter: Get-Help .\Stop-SIRunAndUpdate.ps1 -Full · Source: Stop-SIRunAndUpdate.ps1

Every script, identity and permission for your security review: SecurityInsight

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