custom/Get-JcSdkAppleMdm.ps1
<# .Synopsis Get a list of all Apple MDM configurations. An empty topic indicates that a signed certificate from Apple has not been provided to the PUT endpoint yet.\n\nNote: currently only one MDM configuration per organization is supported.\n\n#### Sample Request\n```\ncurl https://console.jumpcloud.com/api/v2/applemdms \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json' \\\n -H 'x-api-key: {API_KEY}'\n``` .Description Get a list of all Apple MDM configurations. An empty topic indicates that a signed certificate from Apple has not been provided to the PUT endpoint yet.\n\nNote: currently only one MDM configuration per organization is supported.\n\n#### Sample Request\n```\ncurl https://console.jumpcloud.com/api/v2/applemdms \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json' \\\n -H 'x-api-key: {API_KEY}'\n``` .Example PS C:\> {{ Add code here }} {{ Add output here }} .Example PS C:\> {{ Add code here }} {{ Add output here }} .Outputs JumpCloud.SDK.V2.Models.IAppleMdm .Link https://github.com/TheJumpCloud/jcapi-powershell/tree/master/SDKs/PowerShell/JumpCloud.SDK.V2/docs/exports/Get-JcSdkAppleMdm.md #> Function Get-JcSdkAppleMdm { [OutputType([JumpCloud.SDK.V2.Models.IAppleMdm])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] Param( ) Begin { $Results = @() } Process { If ($Paginate -and $PSCmdlet.ParameterSetName -in ('')) { $PSBoundParameters.Remove('Paginate') | Out-Null Do { $Result = JumpCloud.SDK.V2.internal\Get-JcSdkInternalAppleMdm @PSBoundParameters $Result = If ('Results' -in $Result.PSObject.Properties.Name) { $Result.results } Else { $Result } If (-not [System.String]::IsNullOrEmpty($Result)) { $Results += $Result; } } While (-not [System.String]::IsNullOrEmpty($Result)) } Else { $PSBoundParameters.Remove('Paginate') | Out-Null $Result = JumpCloud.SDK.V2.internal\Get-JcSdkInternalAppleMdm @PSBoundParameters $Result = If ('Results' -in $Result.PSObject.Properties.Name) { $Result.results } Else { $Result } If (-not [System.String]::IsNullOrEmpty($Result)) { $Results += $Result; } } } End { Return $Results } } |