Having difficulty using this module...

Jun 26, 2014 at 6:17 AM
Edited Jun 30, 2014 at 11:30 PM
Hi, I came across your module today while trying to find out how to script adding Exit Codes and Requirements for Applications in SCCM 2012. I was over the moon to discover this module as it contains both of those functions as cmdlets.

However, I'm having issues performing either of those functions and I'm hoping you can help.

Add-SCCMRequirementRule: I have tried to test this and all appears to work on the PowerShell prompt, but there's no effect in the SCCM console:
PS C:\Users\...\Documents\WindowsPowerShell> $rule = Copy-SCCMRequirementRule -ApplicationName "Wednesday_AV1_P
V4_3" -DeploymentTypeName "Device Deployment" -SCCMServer <ServerName> -SCCMSiteCode A00 -CopyAll

VERBOSE: Getting CM Application Instance Wednesday_AV1_PV4_3
VERBOSE: Deserialize Application to XML

PS C:\Users\...\Documents\WindowsPowerShell> Add-SCCMRequirementRule -ApplicationName "Wednesday_AV1_PV4_4" -DeploymentTypeName "Device Deployment" -SCCMServer <ServerName> -SCCMSiteCode A00 -RequirementRules $rule

Application                    : Application
Title                          : Device Deployment
Description                    :
Tags                           : {}
Languages                      : {}
Requirements                   : {Free Disk Space of any local drive Greater than or equal to 5000 MB}
Dependencies                   : {}
Supersedes                     : {}
PostConfigurationItem          :
PostInstallConfigurationObject :
DeploymentTechnology           : GLOBAL/MSIDeploymentTechnology
Technology                     : MSI
Hosting                        : Native
Installer                      : MsiInstaller
Functionality                  :
Enabled                        : True
Id                             : 
Scope                          : 
Name                           : DeploymentType_
Version                        : 2
SourceId                       :
IsReadOnly                     : False
IsChanged                      : True
(Note: I removed the ScopeId and other unique information)

Can you shed any light on this?

New-SCCMDeploymentTypeReturnCode: The Get-Help page says to apply the Return Codes with Add-SCCMDeploymentTypeReturnCode but this cmdlet doesn't exist. Can you advise if there's any way to add Return Codes with this module?

Great work on this module. I haven't been able to find any other script online that performs these functions.

Thanks for your help!