Public/attributes/Get-HostPairs.ps1
function Get-HostPairs { <# .SYNOPSIS Retrieve host attribute pairs for a domain or IPv4 address .DESCRIPTION Additional information is available with the -Help parameter .PARAMETER HELP Output dynamic help information #> [CmdletBinding(DefaultParameterSetName = 'GetV2HostAttributesPairs')] [OutputType()] param( [Parameter( ParameterSetName = 'DynamicHelp', Mandatory = $true)] [switch] $Help ) DynamicParam { # Endpoint(s) used by function $Endpoints = @('GetV2HostAttributesPairs') # Create runtime dictionary return (Get-Dictionary $Endpoints -OutVariable Dynamic) } process { if ($Help) { # Output dynamic help Get-DynamicHelp $MyInvocation.MyCommand.Name } else { # Evaluate dynamic input $Param = Get-Param $Endpoints[0] $Dynamic # Make request Invoke-Endpoint @Param } } } |