Create and Deploy an SCCM Application with Powershell

Create and Deploy an SCCM Application with Powershell

PowerShell can be very useful in order to quickly create an application, distribute the content and deploy it all in a few lines of code without the need to go through the SCCM console GUI. In this post i am going to create and deploy “Google Chrome” as an example as to how easily this can be done.

The first step is to connect to the SCCM Site Server via PowerShell. You can do this by simply opening the Configuration Manager Admin Console and clicking the dark blue ribbon at the top and selecting “Connect Via Windows Powershell”

PowerShell Commands

  1. The first command is to create the application, set the name, set the description and allow the application to be installed in a task sequence
    • New-CMApplication -Name “Google Chrome” -Description “Chrome Web Browser” -AutoInstall $true
  2. The next step is to add the MSI deployment type to the application we have just created, selecting where the content is stored (msi file) and choosing the installation behaviour (System/User)
    • Add-CMMsiDeploymentType -ApplicationName “Google Chrome” -ContentLocation “\\cmshare\source files\google chrome\googlechromestandaloneenterprise64.msi” -InstallationBehaviorType InstallForSystem
  3. Now we have created the application we need to distribute the content to the Distribution Point group
    • Start-CMContentDistribution -ApplicationName “Google Chrome” -DistributionPointGroupName “DP Group” -Verbose
  4. Now it is time to deploy the application to the collection of my choice and i am going to make this available in software center immediately
    • New-CMApplicationDeployment -CollectionName “Deploy Google Chrome” -Name “Google Chrome” -DeployAction Install -DeployPurpose Available -UserNotification DisplayAll -AvailableDateTime (get-date) -TimeBaseOn LocalTime -Verbose

Now you should see the Google Chrome in software center on all the devices inside the collection you deployed to.

Jake Stoker

Jake Stoker

Enteprise Mobility + Security SME

Leave a Reply

Your email address will not be published.