functions/Invoke-TokenTransform.ps1
function Invoke-TokenTransform { [CmdletBinding()] param( [parameter(Mandatory=$true)] [string] $TargetFolder, [parameter(Mandatory=$true)] [string] $fileFilter, [parameter(Mandatory=$true)] $configObject ) begin { $files = @() } process { $files = Get-Files -TargetFolder $TargetFolder -fileFilter $fileFilter foreach($file in $files) { Write-Information "Processing: $file" [string]$content = (Get-Content $file -Raw) $content = Complete-TokenTransform -ConfigObject $configObject -Content $content $content | Out-File -FilePath $file -Encoding utf8 } } end { } } |