This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Exchange Online configuration | |
| $ExchangeOrganization = "" | |
| # Configuration - Access package catalogs (add your catalog IDs to this array) | |
| $AccessPackageCatalogs = @( | |
| # Add your Access Package Catalog IDs here | |
| # "12345678-1234-1234-1234-123456789012", | |
| # "87654321-4321-4321-4321-210987654321" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $UserName = "" # Sample: [email protected] | |
| Get-RemoteMailbox $UserName | Select-Object RemoteRoutingAddress, PrimarySmtpAddress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # $ObjectId can be the users AAD object ID or email adress (UPN). | |
| param ( | |
| [Parameter (Mandatory = $true)] | |
| [object]$ObjectIdOrUPN | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE USER [NameOfServicerincipal] FROM EXTERNAL PROVIDER; | |
| EXEC sp_addrolemember 'db_owner', 'NameOfServicePrincipal' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $TenantId = "" | |
| $ApplicationID = "" | |
| $CertificateThumbprint = "" | |
| Connect-MicrosoftTeams -CertificateThumbprint $CertificateThumbprint -ApplicationId $ApplicationID -TenantId $TenantId |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ClientSecret = "" | |
| $ApplicationID = "" | |
| $TenantID = "" | |
| $graphtokenBody = @{ | |
| Grant_Type = "client_credentials" | |
| Scope = "https://graph.microsoft.com/.default" | |
| Client_Id = $ApplicationID | |
| Client_Secret = $ClientSecret | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $HolidayID = Get-CsOnlineSchedule -Id "e48d56a7-461a-46b5-962c-196f6e85145d" | |
| $HolidayID.FixedSchedule.DateTimeRanges += New-CsOnlineDateTimeRange -Start "05/06/2022" -End "06/06/2022" | |
| Set-CsOnlineSchedule -Instance $HolidayID -Verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $CN = "MyAppReg" #Name of your cert. | |
| $cert=New-SelfSignedCertificate -Subject "CN=$CN" -CertStoreLocation "Cert:\CurrentUser\My" -KeyExportPolicy Exportable -KeySpec Signature -NotAfter (Get-Date).AddYears(5) | |
| #Thumbprint - Make note of this | |
| $Thumbprint = $Cert.Thumbprint | |
| #Export cert. to download folder - FilePath can be changed to your linking | |
| Get-ChildItem Cert:\CurrentUser\my\$Thumbprint | Export-Certificate -FilePath $env:USERPROFILE\Downloads\AppRegCert.cer | |
| Write-Output "$Thumbprint <- Copy/paste this (save it)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Installs the Microsoft Graph PowerShell module - Remeber to start PowerShell as admin to be able to install. | |
| Install-Module -Name Microsoft.Graph -verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $AppID = "" | |
| $TenantID = "" | |
| $Thumbprint = "" | |
| Connect-MgGraph -ClientId $AppID -TenantId $TenantID -CertificateThumbprint $Thumbprint |
NewerOlder