Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have some web parts deployed in our Sites, which are not working due to Migration from MOSS to SPS2010, and I need to replace the namespace used by power shell by accessing the Webpart's XML..

share|improve this question
    
If the answer solved the problem statet in your question, you should mark this answer as accepted answer to help future visitors. –  Benny MCSA Office365 Jan 9 at 11:18

1 Answer 1

Try something like this:

$xml = [xml](get-content file.xml)
$xml  = $xml.OuterXml.Replace("xmlns=`"whatever`"", "xmlns=`"new`"")
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.