mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Added help funtion to test for PSObjects members
This commit is contained in:
parent
993defec04
commit
09a681609d
1 changed files with 13 additions and 0 deletions
13
lib/core/tools/Test-PSCustomObjectMember.psm1
Normal file
13
lib/core/tools/Test-PSCustomObjectMember.psm1
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
function Test-PSCustomObjectMember()
|
||||||
|
{
|
||||||
|
param(
|
||||||
|
$PSObject,
|
||||||
|
$Name
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($null -eq $PSObject) {
|
||||||
|
return $FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ([bool]($PSObject.PSobject.Properties.Name -eq $Name));
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue