chore: removed testing functions
This commit is contained in:
13
Setup.ps1
13
Setup.ps1
@ -68,6 +68,14 @@ function Get-OrCreateCountryNamedLocations {
|
||||
return $namedLocationIds
|
||||
}
|
||||
|
||||
# Ensure Microsoft Graph modules are installed
|
||||
foreach ($module in @("Microsoft.Graph", "Microsoft.Graph.Beta", "ExchangeOnlineManagement")) {
|
||||
if (-not (Get-Module -ListAvailable -Name $module)) {
|
||||
Install-Module -Name $module -Scope CurrentUser -Force
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "🔐 Connecting to MS Graph Online..."
|
||||
Connect-MgGraph -NoWelcome -Scopes `
|
||||
"Policy.ReadWrite.SecurityDefaults", `
|
||||
"Policy.ReadWrite.ConditionalAccess", `
|
||||
@ -75,8 +83,8 @@ Connect-MgGraph -NoWelcome -Scopes `
|
||||
"Group.ReadWrite.All", `
|
||||
"Directory.ReadWrite.All", `
|
||||
"UserAuthenticationMethod.ReadWrite.All", `
|
||||
"Application.ReadWrite.All"
|
||||
|
||||
"Application.ReadWrite.All", `
|
||||
"SecurityEvents.ReadWrite.All"
|
||||
|
||||
Write-Host "Connected to Microsoft Graph"
|
||||
|
||||
@ -263,3 +271,4 @@ foreach ($u in $users) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user