Skip to content

Instantly share code, notes, and snippets.

@grenade
Created February 18, 2014 15:39
Show Gist options
  • Save grenade/9073300 to your computer and use it in GitHub Desktop.
Save grenade/9073300 to your computer and use it in GitHub Desktop.
Poke an xml file and change it's values.
param (
[hashtable] $pokes,
[string] $config
)
$xml = (Get-Content $config) -as [xml]
foreach($xpath in $($pokes.Keys)){
$xml.SelectSingleNode($xpath).set_InnerXML($pokes[$xpath])
}
$xml.Save($config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment