Add a function for getting a script initializer

This commit is contained in:
Manuel Thalmann 2024-03-20 18:58:33 +01:00
parent 3ac1ce8c66
commit b3c1c20b72

View file

@ -49,4 +49,13 @@ $null = New-Module {
Pop-Location;
}
function Get-ScriptInitializer() {
param (
[Parameter(Position=0, Mandatory=$true)]
$Initializer
)
return ". ([scriptblock]::Create(($Initializer) -join `"``n`"))";
}
}