From 3ab08c2c9693a79db03e8547bde6fc0efdb53160 Mon Sep 17 00:00:00 2001 From: Sander Rozemuller <43162899+srozemuller@users.noreply.github.com> Date: Thu, 30 May 2024 14:47:05 +0200 Subject: [PATCH] Update run.ps1 --- Security-BreakGlassCertRenewer/run.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Security-BreakGlassCertRenewer/run.ps1 b/Security-BreakGlassCertRenewer/run.ps1 index 2ffb4de..838446d 100644 --- a/Security-BreakGlassCertRenewer/run.ps1 +++ b/Security-BreakGlassCertRenewer/run.ps1 @@ -6,6 +6,8 @@ $informationPreference = 'Continue' # Write an information log with the current time. Write-Output "PowerShell timer trigger function ran! TIME: $currentTime" # Connect to Azure using the system assigned identity +# Disconnect first to make sure we use fresh credentials +Disconnect-AzAccount Connect-AzAccount -Identity $ProgressPreference = "SilentlyContinue"