Thursday, June 14, 2012 9:03 PM
I have to programmatically modify an XmL file based on instructions given here
You will notice that I need to open a XML file called ONET.xml and then go to the element called Project.
Now here I have to set
So that the Project element looks like
Now I wrote this code as
[xml] $dom = get-content onet.xml
<Project Title="Team Web Site" ListDir="Lists" xmlns:ows="Microsoft SharePoint" DisableWebDesignFeatures="wdfopensite">
But this gave me problem and I checked with forums and was informed that wdfopensite has to be added without " marks like shown in first sample.
I am very confused how can I set the Project element with DisableWebDesignFeatures=wdfopensite
The word used was that this done as a Token rather than attribute
but I have no clue of how to set a token programmatically using powershell.
MSDNStudent Knows not much!
- Edited by MSDN Student Thursday, June 14, 2012 9:04 PM
Thursday, June 21, 2012 2:36 AMModerator
Please try the below code first and check out the properties that it has:
Then according to the output, set the proper attribute to the proper value.
Please post the output here for analysis.
TechNet Community Support
- Marked As Answer by Yan Li_Microsoft Contingent Staff, Moderator Monday, June 25, 2012 10:18 AM