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
pool: | |
vmImage: ubuntu-latest | |
resources: | |
repositories: | |
- repository: sharedconfig | |
type: git | |
name: SharedConfiguration | |
variables: |
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
$token = "" | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "azdo",$token))) | |
$uri = "https://dev.azure.com/{organisation}/{teamproject}/_apis/wit/wiql?api-version=5.1" | |
$body = @" | |
{ | |
"query": "Select [System.Id], [System.Title], [System.State] From WorkItems | |
Where [System.TeamProject] = {teamproject} AND [System.WorkItemType] <> 'Test Case' | |
asof '2020-01-08T10:00:00.000Z'"} |
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
Login-AzureRmAccount | |
Select-AzureRmSubscription -SubscriptionId "<yoursubscriptionid>" | |
$destinationResourceGroup = Read-Host -Prompt "What's the desired resource group name?" | |
$numberOfVMs = Read-Host -Prompt "How many VMs do you want to generate?" | |
$location = "West Europe" | |
$vmSize = "Standard_F4s_v2" | |
$accountType = "PremiumLRS" |
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 Microsoft.TeamFoundation.Client; | |
using Microsoft.TeamFoundation.WorkItemTracking.Client; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; |
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=$true)] | |
[string] $PATPassword | |
) | |
$username = "POC-GetBuildDetails" | |
$basicAuth = ("{0}:{1}" -f $username,$PATPassword) | |
$basicAuth = [System.Text.Encoding]::UTF8.GetBytes($basicAuth) | |
$basicAuth = [System.Convert]::ToBase64String($basicAuth) |
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
Write-Host "*** Find deleted branches in TFS and destroy if not used in last 100 days ***" -ForegroundColor Yellow | |
Add-PSSnapin Microsoft.TeamFoundation.PowerShell | |
$tfsServer = Get-TfsServer -name http://<tfsserver>:8080/tfs/<tpccollection> | |
$destroyList = get-tfschilditem -item <versioncontrolpath> -server $tfsServer -Deleted | Where {$_.DeletionId -ne 0 -and $_.CheckinDate -lt (Get-Date).AddDays(-100)} | |
$deletedBranchesFound = $destroyList.Count | |
Write-Verbose "Found $deletedBranchesFound deleted branches for starting the destroy command ..." -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
function Update-AssemblyInfoVersionFiles | |
{ | |
Param | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$productVersion | |
) | |
$buildNumber = $env:BUILD_BUILDNUMBER | |
if ($buildNumber -eq $null) |