Monday, July 9, 2018

PowerShell for Intune Corp device enrollment

There are a bunch of new corporate device examples in the PowerShell github for Intune

Guy should get an award for updating this, its pretty much exactly what I've been looking for

https://github.com/microsoftgraph/powershell-intune-samples/blob/master/CorporateDeviceEnrollment/CorpDeviceEnrollment_Export.ps1


$FileName_CSV = "CorpDeviceIdentifiers" + "_" + $(get-date -f dd-MM-yyyy-H-mm-ss) + ".csv"

$CDI = Get-CorporateDeviceIdentifiers

    if($CDI){

        foreach($CD in $CDI){

        $IDI = $CD.importedDeviceIdentifier
        $Desc = $CD.description

        Write-Host "Adding '$IDI,$Desc' to '$FileName_CSV'..." -ForegroundColor Gray

        Add-Content -Value "$IDI,$Desc" -Path "$ExportPath\$FileName_CSV"

        }

    }

    else {

    Write-Host "No Corporate Device Identifiers found..." -ForegroundColor Red

    }

Write-Host

New Cloud Based Policy Management Service

Really good stuff. We have needed the group targeting for some time now. I also noticed they addeed a bunch of new groups to the Azure AD ...