Skip to content

JP-Repository/Microsoft-Entra-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Microsoft-Entra-Scripts

Remove Broken Graph Modules

Make sure TLS 1.2 is used (old OS sometimes default to TLS 1.0)

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Make sure PSGallery is available

Get-PSRepository

If PSGallery is missing/untrusted, you can do:

Register-PSRepository -Name "PSGallery" -SourceLocation "https://www.powershellgallery.com/api/v2" -InstallationPolicy Trusted

Pre-Requisites For Conditional Access Policies Export

Install the meta-module (this pulls all the sub-modules:

Ensure the below Module is available

Install-Module Microsoft.Graph -Scope AllUsers -Repository PSGallery -AllowClobber -Force

After it finishes, close that PowerShell window, open a new one, then test:

Expect an output when below commands are ran, if output is there Script will work.

Import-Module Microsoft.Graph

Connect-MgGraph -Scopes "Policy.Read.All","Directory.Read.All","Organization.Read.All"

Get-MgOrganization | Select-Object DisplayName Get-MgIdentityConditionalAccessPolicy -Top 1

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors