Private/Get-MgWindowsUpdatesProperty.ps1
|
function Get-MgWindowsUpdatesProperty { [CmdletBinding()] param( [Parameter(Mandatory)] [AllowNull()] [object] $InputObject, [Parameter(Mandatory)] [string] $Name ) if ($null -eq $InputObject) { return $null } if ($InputObject -is [Collections.IDictionary]) { return $InputObject[$Name] } $property = $InputObject.PSObject.Properties[$Name] if ($property) { return $property.Value } return $null } |