mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 04:09:29 -05:00
22 lines
441 B
PowerShell
22 lines
441 B
PowerShell
function Test-IcingaForWindowsCmdletLoader()
|
|
{
|
|
param (
|
|
[string]$Path = ''
|
|
);
|
|
|
|
if ([string]::IsNullOrEmpty($Path)) {
|
|
return $FALSE;
|
|
}
|
|
|
|
if ((Test-Path -Path $Path) -eq $FALSE) {
|
|
return $FALSE;
|
|
}
|
|
|
|
$FrameworkRootDir = [string]::Format('{0}*', (Get-IcingaForWindowsRootPath));
|
|
|
|
if ($Path -NotLike $FrameworkRootDir) {
|
|
return $FALSE;
|
|
}
|
|
|
|
return $TRUE;
|
|
}
|