Quantcast
Channel: Shared Points for SharePoint
Viewing all articles
Browse latest Browse all 12

Removing an invalid WebConfigModification using Powershell

$
0
0

SharePoint supports adding web.config modifications programmatically. Here is an example from MSDN. Each modification is stored with a web application, and you are able to list them using the following command:

$webapp = Get-SPWebApplication http://<your web app url>
$w.WebConfigModifications

If you want to remove an invalid entry, use the following commands:

$modification = $webapp.WebConfigModifications | where { $_.Name -eq "<the name of your key>" }
$webapp.WebConfigModifications.Remove($modification)
$webapp.Update()


Viewing all articles
Browse latest Browse all 12

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>