Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Save-AzureADUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand All @@ -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
Expand Down Expand Up @@ -113,4 +113,4 @@ $xmlWriter.Close()

disconnect-mggraph

write-host "Azure user ID file created: $((Get-Location).Path)\ForensiTAzureID.xml" -ForegroundColor Green
write-host "Azure user ID file created: $((Get-Location).Path)\ForensiTAzureID.xml" -ForegroundColor Green