chore: removed testing functions
This commit is contained in:
13
Setup.ps1
13
Setup.ps1
@ -68,6 +68,14 @@ function Get-OrCreateCountryNamedLocations {
|
|||||||
return $namedLocationIds
|
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 `
|
Connect-MgGraph -NoWelcome -Scopes `
|
||||||
"Policy.ReadWrite.SecurityDefaults", `
|
"Policy.ReadWrite.SecurityDefaults", `
|
||||||
"Policy.ReadWrite.ConditionalAccess", `
|
"Policy.ReadWrite.ConditionalAccess", `
|
||||||
@ -75,8 +83,8 @@ Connect-MgGraph -NoWelcome -Scopes `
|
|||||||
"Group.ReadWrite.All", `
|
"Group.ReadWrite.All", `
|
||||||
"Directory.ReadWrite.All", `
|
"Directory.ReadWrite.All", `
|
||||||
"UserAuthenticationMethod.ReadWrite.All", `
|
"UserAuthenticationMethod.ReadWrite.All", `
|
||||||
"Application.ReadWrite.All"
|
"Application.ReadWrite.All", `
|
||||||
|
"SecurityEvents.ReadWrite.All"
|
||||||
|
|
||||||
Write-Host "Connected to Microsoft Graph"
|
Write-Host "Connected to Microsoft Graph"
|
||||||
|
|
||||||
@ -263,3 +271,4 @@ foreach ($u in $users) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user