mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
15 lines
401 B
PowerShell
15 lines
401 B
PowerShell
|
|
function New-IcingaThreadHash()
|
||
|
|
{
|
||
|
|
param(
|
||
|
|
[ScriptBlock]$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")));
|
||
|
|
}
|