Skip to content

Instantly share code, notes, and snippets.

@sweeneyrobb
Created November 26, 2014 02:38
Show Gist options
  • Save sweeneyrobb/a8660ffac098c25bcb5b to your computer and use it in GitHub Desktop.
Save sweeneyrobb/a8660ffac098c25bcb5b to your computer and use it in GitHub Desktop.
Will prompt for which web.config modification entries to remove from an SPWebApplication. Useful when developer forgets to create a retract handler.
$app = get-spwebapplication "http://{webapp_url}"
$mods = $app.WebConfigModifications
$mods.Remove(($mods | out-gridview -PassThru))
$app.Parent.Update()
$app.Parent.ApplyWebConfigModifications()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment