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
set-executionpolicy -scope CurrentUser -executionPolicy Bypass -Force | |
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) | |
{ | |
# Relaunch as an elevated process: | |
Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs | |
exit | |
} | |
$ProgressPreference = 'SilentlyContinue' |
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
set-executionpolicy -scope CurrentUser -executionPolicy Bypass -Force | |
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) | |
{ | |
# Relaunch as an elevated process: | |
Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs | |
exit | |
} | |
$ProgressPreference = 'SilentlyContinue' |
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
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string] $tfStateFilePath, | |
[Parameter(Mandatory=$true)] | |
[string] $planFilePath, | |
[Parameter(Mandatory=$true)] | |
[string] $AzureSubscriptionId, | |
[Parameter(Mandatory=$true)] | |
[string] $AzureSPNAppId, |
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] $AzureDevOpsPAT, | |
[Parameter(Mandatory=$true)] | |
[string] $OrganizationName, | |
[Parameter(Mandatory=$true)] | |
[string] $teamProjectName, | |
[Parameter(Mandatory=$true)] |
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
param ( | |
[Parameter(Mandatory=$true)] | |
[string] $azureAppId, | |
[Parameter(Mandatory=$true)] | |
[string] $azureAppPwd, | |
[Parameter(Mandatory=$true)] | |
[string] $azureTenant, | |
[Parameter(Mandatory=$true)] | |
[string] $resourceGroupName, | |
[Parameter(Mandatory=$true)] |
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
$sourceBranch = $env:System_PullRequest_SourceBranch | |
$targetBranch = $env:System_PullRequest_TargetBranch | |
$branchControlPattern = $(BranchControlPattern) | |
Write-Host ('PR Source Branch: ' + $sourceBranch) | |
Write-Host ('PR Target Branch: ' + $targetBranch) |
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
param ( | |
[Parameter(Mandatory=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string] $VariableName, | |
[Parameter(Mandatory=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string] $VariableValue | |
) | |
## Construct a basic auth head using PAT |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string] $token, | |
[Parameter(Mandatory=$true)] | |
[string] $fromDate, | |
[Parameter(Mandatory=$true)] | |
[string] $collectionUri, | |
[Parameter(Mandatory=$true)] | |
[string] $teamProjectName, |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string] $token, | |
[Parameter(Mandatory=$true)] | |
[string] $collectionUri, | |
[Parameter(Mandatory=$true)] | |
[string] $teamProjectName, | |
[string] $repoName = '*' | |
) |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string] $token, | |
[Parameter(Mandatory=$true)] | |
[string] $fromDate, | |
[Parameter(Mandatory=$true)] | |
[string] $collectionUri | |
) |
NewerOlder