View AsOfWiqlQueryToFixIterationPath.ps1
$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'"} |
View CreateVSALMVMs.ps1
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" |
View Program.cs
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; |
View KeepBuildForever.ps1
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) |
View DestroyDeletedBranchesInTFS.ps1
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 |
View Update-AssemblyInfoVersionFiles.ps1
function Update-AssemblyInfoVersionFiles | |
{ | |
Param | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$productVersion | |
) | |
$buildNumber = $env:BUILD_BUILDNUMBER | |
if ($buildNumber -eq $null) |