May, 2013

  • ConfigMgr & Intune: Creating An Apple APN Certificate Request

     

    With the introduction of Configuration Manager 2012 SP1, we now have rich management capabilities for iOS devices. One of the apple requirements in order to manage their iOS devices is to request an Apple Push Notification Certificate.

    We can request and apply this certificate right from the ConfigMgr console.

    In the ConfigMgr console, select Administration > Hierarchy Configuration

    Right-Click the Windows Intune Subscriptions and select Create APNs certificate request 

    image

     

    Select a location to save the APN request file, and select Download

    image

     

    A small file is downloaded.

    image

     

    Now browse to the Apple APN Certificates portal (http://go.microsoft.com/fwlink/p/?LinkId=264215) and logon with your Apple ID

    image

     

    After signing in, select the Create a Certificate button

    image

     

    Upload the certificate request file we created from within the ConfigMgr console

    image

     

    The certificate will be created and available to download

    image

     

    You’ll get a MDM_Microsoft Corporation_Certificate.pem file. This is the file you’ll use when you setup your Intune connection in ConfigMgr

    image

     

    Matt Shadbolt

  • Package & Application Source Modification Scripts

    I promised in my last post to provide you all with my scripts for modifying all your package and application source paths… well that was over two months ago now!

    http://blogs.technet.com/b/configmgrdogs/archive/2013/02/18/moving-your-package-source-after-migration.aspx

    Note: These scripts are provided “as-is” and no guarantees are provided. Please TEST these in a non-production environment beforehand.

     

    ApplicationSourceModification.ps1 (Version 1.0)

    First is my script will modify the source paths for all of your Deployment Types within all Applications that are Script or MSI installers (you can modify this to do your App-V Deployment Types too)

    Write-Host "#######################################################################" -f Green
    Write-Host "##        Matts ConfigMgr 2012 SP1 Application Source Modifier       ##" -f Green
    Write-Host "##                blogs.technet.com/b/ConfigMgrDogs                  ##" -f Green
    Write-Host "##                                                                   ##" -f Green
    Write-Host "##                                                                   ##" -f Green
    Write-Host "##  Please ensure your package source content has been moved to the  ##" -f Green
    Write-Host "##          new location *prior* to running this script              ##" -f Green
    Write-Host "##                                                                   ##" -f Green
    Write-Host "#######################################################################" -f Green
    Start-Sleep -s 2

    Write-Host ""
    Write-Host ""
    ## Import ConfigMgr PS Module
    Import-Module 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1'

    ## Connect to ConfigMgr Site
    $SiteCode = Read-Host "Enter your ConfigMgr Site code (XXX)"
    $SiteCode = $SiteCode + ":"
    Set-Location $SiteCode
    Write-Host ""

    ## Set old Source share
    Write-Host "NOTE: This is the location your 2007 packages are stored. It must be correct"
    $OriginalSource = Read-Host "Enter your source ConfigMgr share (\\2007Server\Source$)"

    ## Set new Source share
    Write-Host ""
    Write-Host "NOTE: This is the location your Applications are stored. It must be correct"
    $DestinationSource = Read-Host "Enter your destination ConfigMgr Source share (\\2012SERVER\Source$)"
    Write-Host ""
    Write-Host "Working.."
    Write-Host ""
    ## Get your Application Deployment Types

    $ApplicationName = Get-CMApplication
    $ApplicationName = $ApplicationName.LocalizedDisplayName

    ForEach($x in $ApplicationName)
    {
    $DeploymentTypeName = Get-CMDeploymentType -ApplicationName $x
    #$DeploymentTypeName = $DeploymentTypeName.LocalizedDisplayName

        ForEach($DT in $DeploymentTypeName)
        {
        ## Change the directory path to the new location
        $DTSDMPackageXLM = $DT.SDMPackageXML
        $DTSDMPackageXLM = [XML]$DTSDMPackageXLM
       
        ## Get Path for Apps with multiple DTs
        $DTCleanPath = $DTSDMPackageXLM.AppMgmtDigest.DeploymentType.Installer.Contents.Content.Location[0]
       
        ## Get Path for Apps with single DT
        IF($DTCleanPath -eq "\")
        {
            $DTCleanPath = $DTSDMPackageXLM.AppMgmtDigest.DeploymentType.Installer.Contents.Content.Location
        }
       
        $DirectoryPath = $DTCleanPath -replace [regex]::Escape($OriginalSource), "$DestinationSource"

        ## Modify DT path
        Set-CMDeploymentType –ApplicationName "$x" –DeploymentTypeName $DT.LocalizedDisplayName –MsiOrScriptInstaller –ContentLocation "$DirectoryPath"
       
        ## Write Output
        Write-Host "Application " -f White -NoNewline;
        Write-Host $x -F Red -NoNewline;
        Write-Host " with Deployment Type " -f White -NoNewline;
        Write-Host $DT.LocalizedDisplayName -f Yellow -NoNewline;
        Write-Host " has been modified to " -f White -NoNewline;
        Write-Host $DirectoryPath -f DarkYellow
        }
    }

    PackageSourceModification.ps1 (Version 1.0)

    My second script is much simpler, as we are changing only the Package source location, with no need to cycle through each Deployment Type

    Write-Host "#######################################################################" -f Green
    Write-Host "##        Matts ConfigMgr 2012 SP1 Package Source Modifier           ##" -f Green
    Write-Host "##                blogs.technet.com/b/ConfigMgrDogs                  ##" -f Green
    Write-Host "##                                                                   ##" -f Green
    Write-Host "##                                                                   ##" -f Green
    Write-Host "##  Please ensure your package source content has been moved to the  ##" -f Green
    Write-Host "##          new location *prior* to running this script              ##" -f Green
    Write-Host "##                                                                   ##" -f Green
    Write-Host "#######################################################################" -f Green
    Start-Sleep -s 2

    $SiteCode = Read-Host "Enter your ConfigMgr Site code (XXX)"
    $SiteCode = $SiteCode + ":"
    Set-Location $SiteCode

    $PackageArray = Get-CMPackage
    $OldPath = "\\2007SERVER\source$"
    $NewPath = "\\2012SERVER\cmsource$"
    ForEach ($Package in $PackageArray)
    {
    $ChangePath = $Package.PkgSourcePath.Replace($OldPath, $NewPath)
    Set-CMPackage -Name $Package.Name -Path $ChangePath
    Write-Host $Package.Name " has been changed to " $ChangePath
    }

    Matt Shadbolt