Install-Module -Name GraphEssentials -AllowClobber -ForceForce and AllowClobber aren't necessary, but they do skip errors in case some appear.
Update-Module -Name GraphEssentialsThat'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!
# 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 $AccessTokenConnect-MgGraph -Scopes Application.ReadWrite.All, AccessReview.Read.All, AdministrativeUnit.Read.All, 'User.Read.All', RoleManagement.Read.Directory, Directory.Read.All, EntitlementManagement.Read.AllComplete 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 |