ConfigMgr – Add OS Requirements to an application deployment type

This was updated 6/21/2016.  The script was over hauled to handle windows 10, multiple deployment types and more.
The script and supported files can be found on github here.
This is inspired by this post at mnscug.org
If you are anything like me, perhaps you created a lot of applications in ConfigMgr and decided to configure your deployment types such that there were restrictive in nature as to what Operating Systems they would be able to be deployed to.
ConfigMgr-DeploymentType-Restrictive-Requirement
This works great!  Until you are ready to migrate to new version of the Operating System and now you have to modify every single deployment type.
PowerShell to the rescue – This adds the Windows 8.1 OS to the requirements.  See here for how to get all the OS requirements by querying the CM database.
The script and supported files can be found on github here.  The NameValidatSet.txt must be in the working directory of the script.  This is used to create a dynamic Requirement parameter.

2 thoughts on “ConfigMgr – Add OS Requirements to an application deployment type”

  1. Hello this does not work for me. i get the error that ‘APPNAME’ is not recognised…see below.

    PS C:\Add-FBApplicationDTDeploymentType-master> .\Add-CMApplicationDTRequirement.ps1 | -appName “adobe dc” -sitecode P03 -siteserver PR3.LAB1.COM -Requirement “All Windows 10 (64-bit)”
    -appName : The term ‘-appName’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
    included, verify that the path is correct and try again.
    At line:1 char:40
    + .\Add-CMApplicationDTRequirement.ps1 | -appName “adobe dc” -sitecode P03 -sitese …
    + ~~~~~~~~
    + CategoryInfo : ObjectNotFound: (-appName:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

    1. Your syntax is slightly off. Try this (remove the “|” after the script name) –
      .\Add-CMApplicationDTRequirement.ps1 -appName “adobe dc” -sitecode P03 -siteserver PR3.LAB1.COM -Requirement “All Windows 10 (64-bit)”

Leave a Reply

Your email address will not be published. Required fields are marked *