Skip to content

Instantly share code, notes, and snippets.

View mjfusa's full-sized avatar

Mike Francis mjfusa

  • Microsoft
  • Roseville, California, USA
View GitHub Profile
@niclaslindstedt
niclaslindstedt / Replace-Tokens.ps1
Last active October 11, 2023 08:12
PowerShell script to replace tokens in a file. Useful for DevOps when you have a template config file that you wish to insert real values into.
<#
.SYNOPSIS
Replace tokens in a file with values.
.DESCRIPTION
Finds tokens in a given file and replace them with values. It is best used to replace configuration values in a release pipeline.
.PARAMETER InputFile
The file containing the tokens.