New Projects

My previous employer kindly allowed me to opensource my work. The time has come to put this work in the public domain. The core project consisted of PowerShell scripts to add NuGet functionality to Visual Studio SQL Server database projects. My implementation was over-complicated, so I will be simplifying things. That will be my first … Continue reading New Projects

Advertisement

Prototyping with PowerShell

Requirements, specification, design and implementation Requirement We have two NuGet servers. The primary server is locally hosted for the developers. The second server is an Azure DevOps NuGet feed for contractors typically working outside the firewall. A scheduled task synchronizing the two servers runs hourly, copying any new packages from the local server to the … Continue reading Prototyping with PowerShell

Downloading an Azure DevOps Universal Package from the Command Line

Automating Azure DevOps There are several ways in which Azure DevOps can be automated with scripts. Here I show how to use the AZ command line tool retrieve an artifact created by a build pipeline. Understanding how to use a CLI tool is the first requirement for automation. The Azure DevOps CLI provides access to … Continue reading Downloading an Azure DevOps Universal Package from the Command Line

A NuGet List item parser – Part 2: Including Pre-release packages

In Part 1 I reorganised my NuGet source synchronization tool's code to make it testable, with the specific aim of allowing pre-release packages to be synchronized. In particular, the affected code was isolated into this function: function Parse-PackageItem { param( [string]$Package ) $idVer = $Package.Split(' ') if ($idVer.Length -eq 2) { $id = $idVer[0] [string]$ver … Continue reading A NuGet List item parser – Part 2: Including Pre-release packages

A NuGet List item parser – Part 1: Making legacy code testable

I am building a tool to synchronize two NuGet servers. One is hosted on a development server, and the other is in the cloud. I need to add support for Pre-Release packages. In the first of two parts, I refactor the code to make it testable. The existing code This tool started its life as … Continue reading A NuGet List item parser – Part 1: Making legacy code testable

Parameterizing Scripts with PowerShell Data Files

In my previous blog I introduced the Get-Blacklist function which turned a string array into a hashtable for quick comparisons: function Get-Blacklist { param( [string[]]$Blacklist ) $blacklistHash = @{} $Blacklist | % { $blacklistHash[$_] = $true } $blacklistHash } and invoked it thus: . .\Scripts\Get-Blacklist.ps1 @blacklist = Get-Blacklist -Blacklist 'Powershell','Sandbox','sqlccJamie','Graphics','CentinelTest','Backoffice Service Portal' As a rule I … Continue reading Parameterizing Scripts with PowerShell Data Files