From 899bf317f919844594b72e08a534585082d1819b Mon Sep 17 00:00:00 2001 From: Jim Millican Date: Fri, 8 May 2026 10:59:29 -0400 Subject: [PATCH] Update Save-AzureADUser.ps1 Added -AllowClobber for cleaner Graph package install. Removed -NoWelcome from Connect-MgGraph. It is documented by Microsoft, but was throwing an error. --- Save-AzureADUser.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Save-AzureADUser.ps1 b/Save-AzureADUser.ps1 index 51958c0..7bb0b0a 100644 --- a/Save-AzureADUser.ps1 +++ b/Save-AzureADUser.ps1 @@ -17,7 +17,7 @@ if(-not $getmodule) Write-Warning "Administrator permissions are needed to install the Microsoft.Graph PowerShell module.`nPlease re-run this script as an Administrator." Exit } - install-module Microsoft.Graph -scope AllUsers + install-module Microsoft.Graph -scope AllUsers -AllowClobber } else { @@ -45,7 +45,7 @@ if($installedversion -lt $latestversion) Write-Warning "Administrator permissions are needed to update the Microsoft.Graph PowerShell module.`nPlease re-run this script as an Administrator." Exit } - install-module Microsoft.Graph -scope AllUsers -Force + install-module Microsoft.Graph -scope AllUsers -Force -AllowClobber } else { @@ -68,7 +68,7 @@ if($context) } # make new connection -connect-mggraph -scopes "User.Read.All,Organization.Read.All" -NoWelcome +connect-mggraph -scopes "User.Read.All,Organization.Read.All" # Get details $users=get-mguser -all @@ -113,4 +113,4 @@ $xmlWriter.Close() disconnect-mggraph -write-host "Azure user ID file created: $((Get-Location).Path)\ForensiTAzureID.xml" -ForegroundColor Green \ No newline at end of file +write-host "Azure user ID file created: $((Get-Location).Path)\ForensiTAzureID.xml" -ForegroundColor Green