Skip to content

Instantly share code, notes, and snippets.

@CodyMathis123
Last active May 6, 2019 17:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save CodyMathis123/3ba3a18f10433706da3ced3b7d25aa80 to your computer and use it in GitHub Desktop.
#region determine which Requirements we need to add for this deployment type based on ProductIDs
$Requirements = [System.Collections.ArrayList]::new()
switch -Regex ($DT.ProductIDs) {
'^VisioPro(X|2019)Volume$' {
$null = $Requirements.Add($VisPro_Rule)
}
'^VisioStd(X|2019)Volume$' {
$null = $Requirements.Add($VisStandard_Rule)
}
'^VisioProRetail$' {
$null = $Requirements.Add($Vis_Rule)
}
'^ProjectPro(X|2019)Volume$' {
$null = $Requirements.Add($ProjPro_Rule)
}
'^ProjectStd(X|2019)Volume$' {
$null = $Requirements.Add($ProjStandard_Rule)
}
'^ProjectProRetail$' {
$null = $Requirements.Add($Proj_Rule)
}
}
switch -Regex ($DT.ProductIDs) {
'2019' {
$null = $Requirements.Add($2019_Rule)
break
}
'XVolume' {
$null = $Requirements.Add($2016_Rule)
break
}
}
$addCMScriptDeploymentTypeSplat.AddRequirement = $Requirements
#endregion determine which Requirements we need to add for this deployment type based on ProductIDs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment