Skip to content

Instantly share code, notes, and snippets.

Richard Fennell rfennell

Block or report user

Report or block rfennell

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
@rfennell
rfennell / Add-CapabilityToAgent.ps1
Last active Dec 6, 2018
A bit of PowerShell to add capabilities to a Azure DevOps Pipeline Agent programmatically
View Add-CapabilityToAgent.ps1
##-----------------------------------------------------------------------
## <copyright file="Add-CapabilityToAgent.ps1">(c) Tichard Fennell </copyright>
##-----------------------------------------------------------------------
# Adds capacility tags a Azure DevOps Pipeline agent
# Run in the agent folder
Param
(
[parameter(Mandatory=$true,HelpMessage="Personal Access Token with rights to manage agents")]
$patToken,
View Backup-VSTSInstance.ps1
param
(
[Parameter(Mandatory = $true)]
[string]$pat,
[Parameter(Mandatory = $true)]
[string]$instance,
[Parameter(Mandatory = $true)]
@rfennell
rfennell / Update-AppConfig.ps1
Created Feb 13, 2018
PowerShell script to update an app.config file based on a parameters.xml
View Update-AppConfig.ps1
function Update-AppConfig
{
[cmdletbinding()]
param
(
[parameter(Mandatory = $true, HelpMessage = "Name of app.exe.config file")]
[string]$AppConfigFile,
[parameter(Mandatory = $false, HelpMessage = "Name of parameters.xml file")]
[string]$ParametersFile = "parameters.xml"
@rfennell
rfennell / CommitToThisRepo.ps1
Created Jan 19, 2018
PowerShell script add a commit to the current repo for use inside a VSTS CI/CD process
View CommitToThisRepo.ps1
(
$file = "readme.md",
$text = "Automated edit",
$wi = "#13 #14"
)
"Set config"
git config --global user.email "builduser@dummy.local" # any values will do, if missing commit will fail
git config --global user.name "Build user"
@rfennell
rfennell / RemoveXAMLBuildController
Last active Dec 29, 2016
Tool to remove a XAML build controller from a VSTS instance
View RemoveXAMLBuildController
using Microsoft.TeamFoundation.Build.Client;
using Microsoft.TeamFoundation.Client;
using System;
using System.Linq;
// Needs the Nuget package Microsoft.TeamFoundationServer.ExtendedClient
namespace RemoveXAMLBuildController
{
class Program
{
@rfennell
rfennell / RMTransform.cs
Last active Dec 20, 2016
Transform tool for transferring TFS 2015.3 Release Templates to VSTS
View RMTransform.cs
using Newtonsoft.Json.Linq;
using System;
using System.IO;
using System.Linq;
namespace RMTransform
{
class Program
{
static void Main(string[] args)
@rfennell
rfennell / ReleaseNotesWithFilter.ps1
Created Aug 23, 2016
How to add filters to release note generation
View ReleaseNotesWithFilter.ps1
function Get-Mode
{
Param(
$line
)
$returnvalue = "" | Select-Object -Property mode, skipLogic
$mode = [Mode]::BODY
You can’t perform that action at this time.