icinga-powershell-framework/lib/core/thread/New-IcingaThreadHash.psm1
2021-09-02 09:23:10 +02:00

14 lines
396 B
PowerShell

function New-IcingaThreadHash()
{
param(
[string]$ShellScript,
[array]$Arguments
);
[string]$ScriptString = '';
[string]$ArgString = ($Arguments | Out-String);
if ($null -ne $ShellScript) {
$ScriptString = $ShellScript.ToString();
}
return (Get-StringSha1 -Content ($ScriptString + $ArgString + (Get-Date -Format "MM-dd-yyyy-HH-mm-ffff")));
}