Public/Get-IPSTDeviceEnrollmentConfigurations.ps1
function Get-IPSTDeviceEnrollmentConfigurations { <# .SYNOPSIS Get-IPSTDeviceEnrollmentConfigurations .DESCRIPTION .PARAMETER DeviceEnrollmentConfigurationId Specifi Device Enrollment Configuration ID for get specific policy. .INPUTS None .OUTPUTS None .NOTES Author: Jan Řežab GitHub: https://github.com/rezabj/IntunePSToolbox Blog: https://www.rezab.eu .EXAMPLE PS> Get-IPSTDeviceEnrollmentConfigurations -DeviceEnrollmentConfigurationId 00000000-0000-0000-0000-000000000000 #> [CmdletBinding()] param ( [Parameter()] [string]$DeviceEnrollmentConfigurationId ) $Resource = '/deviceManagement/deviceEnrollmentConfigurations' $Params = @{ "AccessToken" = $Global:IPSTAccessToken "GraphMethod" = 'GET' } if ($DeviceConfigurationId) { $Params += @{ "GraphUri" = 'https://graph.microsoft.com/' + $IPSTGraphApiEnv + $Resource + "/" + $DeviceEnrollmentConfigurationId } } else { $Params += @{ "GraphUri" = 'https://graph.microsoft.com/' + $IPSTGraphApiEnv + $Resource } } $Result = Invoke-GraphAPIRequest @Params return $Result } |