Add a function for getting a script initializer
This commit is contained in:
parent
3ac1ce8c66
commit
b3c1c20b72
1 changed files with 9 additions and 0 deletions
|
@ -49,4 +49,13 @@ $null = New-Module {
|
||||||
|
|
||||||
Pop-Location;
|
Pop-Location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-ScriptInitializer() {
|
||||||
|
param (
|
||||||
|
[Parameter(Position=0, Mandatory=$true)]
|
||||||
|
$Initializer
|
||||||
|
)
|
||||||
|
|
||||||
|
return ". ([scriptblock]::Create(($Initializer) -join `"``n`"))";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue