chore: update ImportPolicies.ps1 to install SDK if not found
This commit is contained in:
@ -1,3 +1,14 @@
|
||||
# Check if the Microsoft Graph PowerShell SDK is installed
|
||||
if (-not (Get-Module -ListAvailable -Name Microsoft.Graph)) {
|
||||
Install-Module -Name Microsoft.Graph -Scope CurrentUser -Force
|
||||
}
|
||||
|
||||
# Check if the Microsoft Graph PowerShell SDK is installed
|
||||
if (-not (Get-Module -ListAvailable -Name Microsoft.Graph.Beta)) {
|
||||
Install-Module -Name Microsoft.Graph.Beta -Scope CurrentUser -Force
|
||||
}
|
||||
|
||||
|
||||
# Connect to Microsoft Graph
|
||||
Connect-MgGraph -Scopes "DeviceManagementConfiguration.ReadWrite.All", "Organization.Read.All", "Group.ReadWrite.All", "Directory.ReadWrite.All" -NoWelcome
|
||||
|
||||
|
Reference in New Issue
Block a user