So, I'm trying to create a script to help my team with the creation of application packages, so that things are a little quicker, and more cookie cutter with fewer little differences between application configs. I have most of it seemingly working, but I'm running into an issue with Add-CMScriptDeploymentType and the -ContentFallback parameter. Basically, I'm getting the following error:
Add-CMScriptDeploymentType : A positional parameter cannot be found that accepts argument 'True'. At C:\Users\User\Documents\New-MECMApplication.ps1:22 char:1 Add-CMScriptDeploymentType -ApplicationName $ApplicationName -Deploym ...
CategoryInfo : InvalidArgument: (:) [Add-CMScriptDeploymentType], ParameterBindingException FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ConfigurationManagement.PowerShell.Cmdlets.AppMan.AddScriptDeploymentType
And here is the command itself that it's erroring from:
Add-CMScriptDeploymentType -ApplicationName $ApplicationName -DeploymentTypeName DT_Script_Npp -InstallCommand $InstallString -UninstallCommand $UninstallString -AddDetectionClause $clause -ContentLocation $ContentPath -InstallationBehaviorType InstallForSystem -MaximumRuntimeMins 30 -LogonRequirementType WhetherOrNotUserLoggedOn -ContentFallback $true -SlowNetworkDeploymentMode Download
Now, according to the documentation for this cmdlet, it LOOKS like I should be using $true for the value of -ContentFallback when I want that option enabled.
If you set this parameter to $true, when the content isn't available on any distribution points in the client's current or neighbor boundary groups, the client can use distribution points in the site default boundary group.
But apparently I'm doing it wrong or something? Any ideas?