Last active
April 20, 2021 11:38
-
-
Save itpropro/69f8a0ef50d2ec11e3dbd0931daebae2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$xmlpath = 'C:\Temp\DeploymentConfigTemplate.xml' | |
$features = New-Object -TypeName System.Collections.ArrayList | |
[xml]$xml = Get-Content $xmlpath | |
$xml.Objs.Obj.LST.Obj | ForEach-Object {$null = $features.Add($_.GetElementsByTagName('ToString').'#text')} | |
for ($i = 0; $i -lt $features.Count; $i++) | |
{ | |
$features[$i] = $features[$i].Substring($features[$i].IndexOf('_') + 1).Replace('_','-') | |
} | |
$features |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful to me.