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
| using namespace System.Net | |
| # Input bindings are passed in via param block. | |
| param($Request, $TriggerMetadata) | |
| # Write to the Azure Functions log stream. | |
| Write-Host "PowerShell HTTP trigger function processed a request." | |
| # Define UserId (the user you want to set presence for) | |
| $UserId = "" |
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
| $allAudioFiles = @() | |
| $allAudioFiles += Get-CsOnlineAudioFile -ApplicationId TenantGlobal | |
| $allAudioFiles += Get-CsOnlineAudioFile -ApplicationId HuntGroup | |
| $allAudioFiles += Get-CsOnlineAudioFile -ApplicationId OrgAutoAttendant | |
| $audioFile = $allAudioFiles | Out-GridView -Title "Choose an audio file..." -PassThru | |
| $content = Export-CsOnlineAudioFile -Identity $audioFile.Id -ApplicationId $audioFile.ApplicationId | |
| $defaultPath = Get-Location |
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
| # Author: Martin Heusser (@mozzeph) | |
| Connect-MicrosoftTeams | |
| $autoAttendantSelection = Get-CsAutoAttendant | Select-Object Name, Identity| Out-GridView -Title "Choose an Auto Attendant from the list." -PassThru | |
| $tr1 = New-CsOnlineTimeRange -Start 08:15 -End 12:00 | |
| $tr2 = New-CsOnlineTimeRange -Start 13:30 -End 17:45 | |
| #$tr3 = New-CsOnlineTimeRange -Start 08:30 -End 16:00 |
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
| # Author: Martin Heusser (@mozzeph) | |
| Connect-MicrosoftTeams | |
| $allResourceAccounts = Get-CsOnlineApplicationInstance | Where-Object {$_.ApplicationId -eq "11cd3e2e-fccb-42ad-ad00-878b93575e07" -or $_.ApplicationId -eq "ce933385-9390-45d1-9512-c8d228074e07"} | |
| $allDeepLinks = @() | |
| foreach ($resourceAccount in $allResourceAccounts) { |
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
| # Author: Martin Heusser (@mozzeph) | |
| # Required Scopes: "profile", "openid", "User.Read.All", "Chat.Create" | |
| $AppId = '' | |
| $AppSecret = '' | |
| $TenantName = '' | |
| function Connect-HTTPGraph { | |
| param ( | |
| [Parameter(Mandatory=$true)][String]$AppId, |
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
| Connect-MicrosoftTeams | |
| $allCallQueues = Get-CsCallQueue -WarningAction SilentlyContinue | |
| $choices = @() | |
| $callQueueCounter = 1 | |
| foreach ($callQueue in $allCallQueues) { |
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
| using namespace System.Net | |
| # Input bindings are passed in via param block. | |
| param($Request, $TriggerMetadata) | |
| $uri = "Your Runbook Webhook URL" | |
| $refreshUri = "Your Refresh Card Function URL" | |
| $actionCardCq = @' | |
| { |
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
| param | |
| ( | |
| [Parameter (Mandatory = $false)] | |
| [object] $WebhookData | |
| ) | |
| $uri = "Your Teams Channel Webhook URL" | |
| $Body = (ConvertFrom-Json -InputObject $WebhookData.RequestBody) |
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
| using namespace System.Net | |
| # Input bindings are passed in via param block. | |
| param($Request, $TriggerMetadata) | |
| $action = $Request.Body.actionType | |
| $callQueueName = $Request.Body.QueueName | |
| $callQueueId = $Request.Body.QueueId | |
| $targetNumber = $Request.Body.Number |
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
| $defaultOverFlowThreshold = 10 | |
| $webHookUrl = "" | |
| $Credentials = Get-AutomationPSCredential -Name "AzAutomationAdmin" | |
| Connect-MicrosoftTeams -Credential $Credentials | |
| $allCallQueues = Get-CsCallQueue -WarningAction SilentlyContinue | |
| foreach ($callQueue in $allCallQueues) { |