# gpresult.osdcloud.ch # IRM (IEX https://gpresult.osdcloud.ch -Report Basic) # IRM (IEX https://gpresult.osdcloud.ch -Report Full) <# Powershell.exe cd C:\ProgramData Set-ExecutionPolicy bypass -Scope Process Save-Script Get-IntuneManagementExtensionDiagnostics -Path ./ ./Get-IntuneManagementExtensionDiagnostics.ps1 # -Online when you need to get displayNames to Powershell scripts ./Get-IntuneManagementExtensionDiagnostics.ps1 -Online ./Get-IntuneManagementExtensionDiagnostics.ps1 -Online -ShowLogViewerUI -ConvertAllKnownGuidsToClearText #> While ($Report = (Read-Host Please define your report type: "Basic" or "Full")) { if (($Report -ne "Full" -and ($Report -ne "Basic"))) { Write-Warning -Message 'Did you write correctly? "Basic" or "Full"' } else { Write-Warning "$Report report will be crated to C:\Temp\MDMDiagnostics\IntuneReport$Report.html" break } } Write-Warning "Installing PowerShell Module" Install-Module -Name IntuneStuff -Verbose -Force -AllowClobber Write-Warning "Importing PowerShell Module" Import-Module -Name IntuneStuff Write-Warning "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force" Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force # basic report If ($Report = "Basic") { Get-ClientIntunePolicyResult -asHTML -HTMLReportPath C:\Temp\MDMDiagnostics\IntuneReportBasic.html } # full report If ($Report = "Full") { Connect-msgraph Get-ClientIntunePolicyResult -asHTML -getDataFromIntune -showConnectionData -showEnrollmentIDs -showURLs -HTMLReportPath C:\Temp\MDMDiagnostics\IntuneReportFull.html }