This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region generate PSCustomObject that we will loop through to create DeploymentTypes | |
$DeploymentTypes = foreach ($XML in $FilteredXML_Configs) { | |
#region Load XML and manipulate based on input parameters, and gather information | |
$Config = $XML.Name | |
$ConfigXML = [xml]::new() | |
$ConfigXML.PreserveWhitespace = $true | |
$ConfigXML.Load($XML.FullName) | |
$ConfigXML.Configuration.AppSettings.Setup.Value = $Company | |
$ConfigXML.Configuration.Add.OfficeClientEdition = $XML_Bitness | |
$ConfigXML.Configuration.Add.Version = $FullBuildNumber | |
$ConfigXML.Configuration.Add.Channel = $XML_Channel | |
$ConfigXml.Configuration.Add.AllowCdnFallback = $($AllowCdnFallback | Out-String) | |
$ConfigXml.Configuration.Display.Level = $DisplayLevel | |
$ConfigXML.Save($XML.FullName) | |
$AppName = $ConfigXML.Configuration.Info.Description | |
$ProductIDs = $ConfigXML.Configuration.Add.Product.ID | |
#endregion Load XML and manipulate based on input parameters, and gather information | |
[PSCustomObject]@{ | |
Config = $Config | |
AppName = $AppName | |
AppSource = $AppRoot | |
ProductIDs = $ProductIDs | |
NameLength = $($AppName.Length) | |
} | |
} | |
# We sort the deployment types so that the priority order ensures proper installation depending on existing apps | |
$DeploymentTypes = $DeploymentTypes | Sort-Object -Property NameLength, AppName -Descending | |
#endregion generate PSCustomObject that we will loop through to create DeploymentTypes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment