This file contains 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
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $false)] | |
[string]$SasUri, | |
[Parameter(Mandatory = $false)] | |
[string]$SasToken | |
) | |
Clear-Host |
This file contains 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
$authenticationHeader = @{ | |
"Sec-Fetch-Dest" = "empty"; | |
"Sec-Fetch-Mode" = "cors"; | |
"accept-encoding" = "gzip, deflate, br"; | |
"accept-language" = "en"; | |
"x-ms-effective-locale" = "en.en-us" | |
"Authorization" = "Bearer <#TokenValuePlainText#>"; | |
"Content-Type" = "application/json"; | |
"x-ms-client-request-id" = (New-Guid).Guid; | |
"x-ms-session-id" = "12345678910111213141516"; |
This file contains 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
function Get-AccessToken { | |
<# | |
.Synopsis | |
Creates an Access token for Microsoft Graph | |
.DESCRIPTION | |
This function can be used to create an Access Token to query the Microsoft Graph API. | |
.PARAMETER ApplicationId [string] | |
Enter the Application ID | |
.PARAMETER ApplicationSecret [string] | |
Enter the Application Secret |
This file contains 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
pr: none | |
trigger: none | |
variables: | |
serviceConnection: '<NameOfYourServiceConnection>' | |
pool: | |
vmImage: 'ubuntu-latest' | |
stages: |
This file contains 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
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $True)] | |
[guid]$UserObjectId, | |
[Parameter(Mandatory = $True)] | |
[guid]$roleDefinitionId | |
) | |
function Get-GraphToken { |
This file contains 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
$TeamsPath = "$($env:appdata)\Microsoft\Teams\Backgrounds\Uploads" | |
$web = New-Object Net.WebClient | |
$webclient = New-Object System.Net.WebClient | |
$baseUrl = "https://www.bing.com" | |
$jsonUrl = "https://www.bing.com/HPImageArchive.aspx?format=js&mbl=1&idx=0&n=1&cc=auto" | |
if (-not(Test-Path $TeamsPath)) { | |
New-Item -ItemType Directory -Path $TeamsPath | |
} |
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"virtualMachines": { | |
"type": "Array" | |
} | |
}, | |
"resources": [ | |
{ |
This file contains 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
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory = $true)] | |
[string] $Publisher, | |
[Parameter(Mandatory = $true)] | |
[string] $ExtensionName, | |
[Parameter(Mandatory = $true)] |
NewerOlder