Skip to content

Instantly share code, notes, and snippets.

@Calvindd2f
Last active February 23, 2024 04:17
Show Gist options
  • Select an option

  • Save Calvindd2f/a16b21fe6cc8f1280ee19bf30d0d78b3 to your computer and use it in GitHub Desktop.

Select an option

Save Calvindd2f/a16b21fe6cc8f1280ee19bf30d0d78b3 to your computer and use it in GitHub Desktop.
[object Object]
if (!(Get-Module -Name @{"ExchangeOnlineManagement","Microsoft.Graph","Az"})) {
$null=(Install-Module Microsoft365DSC -Scope CurrentUser -AllowCLobber)
$null=(Install-Module Az -Scope CurrentUser -AllowCLobber)
Import-Module Microsoft365DSC
Update-M365DSCDependencies -ValidateOnly -Scope CurrentUser
}
else {break}
($Application) ? $(@{$appId=$env:appId;$tenantId=$env:tenantId;$secret=(ConvertTo-SecureString -String $env:appSecret -AsPlainText);$thumb=$env:thumb}) : $($scopes='user.read')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment