public/managed_install/Get-ManagedInstallMachineCompatibility.ps1
Function Get-ManagedInstallMachineCompatibility { [cmdletBinding( SupportsShouldProcess = $true, ConfirmImpact = 'low' )] param( [Parameter( Mandatory, Position = 0, ValueFromPipeline, ValueFromPipelineByPropertyName )] [Alias('MachineId')] [int] $Id, [Parameter()] [ValidatePattern("^\?")] [string] $QueryParameters ) Begin { } Process { $Endpoint = "/api/managed_install/machines/{0}" -f $Id If ($PSCmdlet.ShouldProcess($Server, "GET $Endpoint")) { $newApiGETRequestSplat = @{ QueryParameters = $QueryParameters Endpoint = $Endpoint } $Result = New-ApiGETRequest @newApiGETRequestSplat } } End { $Result.Machines } } |