Skip to content

Instantly share code, notes, and snippets.

Pieter Gheysens pietergheysens

Block or report user

Report or block pietergheysens

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Update-AssemblyInfoVersionFiles.ps1
function Update-AssemblyInfoVersionFiles
{
Param
(
[Parameter(Mandatory=$true)]
[string]$productVersion
)
$buildNumber = $env:BUILD_BUILDNUMBER
if ($buildNumber -eq $null)
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 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)
@pietergheysens
pietergheysens / Program.cs
Created Sep 12, 2016
Move inline images of work item description field to VSTS
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;
@pietergheysens
pietergheysens / CreateVSALMVMs.ps1
Created Jan 3, 2018
Create Visual Studio ALM Virtual Machines based on specialized vhd file in Microsoft Azure
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"
You can’t perform that action at this time.