Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GraphEssentials is a PowerShell module that helps with Office 365 / Azure AD using mostly Graph

Notifications You must be signed in to change notification settings

EvotecIT/GraphEssentials

Repository files navigation

GraphEssentials PowerShell Module

To install

Install-Module -Name GraphEssentials -AllowClobber -Force

Force and AllowClobber aren't necessary, but they do skip errors in case some appear.

And to update

Update-Module -Name GraphEssentials

That's it. Whenever there's a new version, you run the command, and you can enjoy it. Remember that you may need to close, reopen PowerShell session if you have already used module before updating it.

The essential thing is if something works for you on production, keep using it till you test the new version on a test computer. I do changes that may not be big, but big enough that auto-update may break your code. For example, small rename to a parameter and your code stops working! Be responsible!

Using Graph

Connecting with ApplicationID, ApplicationSecret as an application

# Client secret Encrypted can be saved to file and then loaded from file
$ClientSecretEncrypted = 'ClientSecretToEncrypt' | ConvertTo-SecureString -AsPlainText | ConvertFrom-SecureString
$AccessToken = Get-MgToken -Domain 'evotec.pl' -ClientID 'ClientID' -ClientSecretEncrypted $ClientSecretEncrypted
Connect-MgGraph -AccessToken $AccessToken

Connecting with delegated rights

Connect-MgGraph -Scopes Application.ReadWrite.All, AccessReview.Read.All, AdministrativeUnit.Read.All, 'User.Read.All', RoleManagement.Read.Directory, Directory.Read.All, EntitlementManagement.Read.All

Available Commands

Complete list of commands available in GraphEssentials module.

CommandType Name
Function Get-MgToken
Function Get-MyApp
Function Get-MyAppCredentials
Function Get-MyConditionalAccess
Function Get-MyDefenderDeploymentKey
Function Get-MyDefenderHealthIssues
Function Get-MyDefenderSecureScore
Function Get-MyDefenderSecureScoreProfile
Function Get-MyDefenderSensor
Function Get-MyDefenderSummary
Function Get-MyDevice
Function Get-MyDeviceIntune
Function Get-MyLicense
Function Get-MyRole
Function Get-MyRoleHistory
Function Get-MyRoleUsers
Function Get-MyTeam
Function Get-MyTenantName
Function Get-MyUsageReports
Function Get-MyUser
Function Get-MyUserAuthentication
Function Invoke-MyGraphEssentials
Function Invoke-MyGraphUsageReports
Function New-MyApp
Function New-MyAppCredentials
Function Register-FIDO2Key
Function Remove-MyAppCredentials
Function Send-MyApp
Function Show-MyApp
Function Show-MyConditionalAccess
Function Show-MyDefender
Function Show-MyRole
Function Show-MyUserAuthentication

About

GraphEssentials is a PowerShell module that helps with Office 365 / Azure AD using mostly Graph

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •