2015-11-10 17:41:54 +01:00
|
|
|
Function IsWindows
|
|
|
|
{
|
|
|
|
$pingCommand = Get-Command -CommandType Application ping
|
2016-02-05 23:57:08 +01:00
|
|
|
if ($pingCommand.Definition.IndexOf("\") -ne -1)
|
2015-11-10 17:41:54 +01:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
Function GetTempDir
|
|
|
|
{
|
|
|
|
if (IsWindows)
|
|
|
|
{
|
|
|
|
return $env:TEMP
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-12-19 02:22:39 +01:00
|
|
|
return "/tmp"
|
2015-11-10 17:41:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|