diff --git a/lib/core/cache/Set-IcingaCacheData.psm1 b/lib/core/cache/Set-IcingaCacheData.psm1 index 6a84ab61..545fd1bb 100644 --- a/lib/core/cache/Set-IcingaCacheData.psm1 +++ b/lib/core/cache/Set-IcingaCacheData.psm1 @@ -41,7 +41,7 @@ function Set-IcingaCacheData() $cacheData = Get-IcingaCacheData -Space $Space -CacheStore $CacheStore; } else { try { - New-Item -Path $CacheFile -Force | Out-Null; + New-Item -ItemType File -Path $CacheFile -Force | Out-Null; } catch { Exit-IcingaThrowException -InputString $_.Exception -CustomMessage (Get-IcingaCacheDir) -StringPattern 'NewItemUnauthorizedAccessError' -ExceptionType 'Permission' -ExceptionThrown $IcingaExceptions.Permission.CacheFolder; Exit-IcingaThrowException -CustomMessage $_.Exception -ExceptionType 'Unhandled' -Force; @@ -66,4 +66,4 @@ function Set-IcingaCacheData() Exit-IcingaThrowException -InputString $_.Exception -CustomMessage (Get-IcingaCacheDir) -StringPattern 'System.UnauthorizedAccessException' -ExceptionType 'Permission' -ExceptionThrown $IcingaExceptions.Permission.CacheFolder; Exit-IcingaThrowException -CustomMessage $_.Exception -ExceptionType 'Unhandled' -Force; } -} +} \ No newline at end of file