Created
April 22, 2016 15:09
-
-
Save daserge/ac08b510a8cc401f0654cd67e06057e4 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
| (get-content config.xml) | foreach-object { | |
| $wordToFind='windows-target-version' | |
| $containsWord=$_ -match $wordToFind | |
| If($containsWord -contains $true) { | |
| $_ -replace '(<preference name=\"windows-target-version\" value=\")([^\"]+)(\" \/><\/widget>)', '${1}10.0${3}' | |
| } Else { | |
| $_ -replace '<\/widget>', '<preference name="windows-target-version" value="10.0" /></widget>' | |
| } | |
| } | set-content config.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment