Hello Neil,
I guess this is where you end up:
$psxml.configuration.system.diagnostics
In that case wrap system.diagnostics in quotes,the dot inside the tag name
is the trouble maker, making PS to think it is a child element (property)
of "system":
$psxml.configuration."system.diagnostics"
trace sources sharedListeners switches
----- ------- --------------- --------
trace sources sharedListeners switches
---
Shay Levy
Windows PowerShell
http://blogs.microsoft.co.il/blogs/ScriptFanatic
NC> I'm trying to use a section from a web.config file that I use to
NC> troubleshoot WebServices within asp.net applications. However, it
NC> doesn't
NC> seem to load at all.
NC> I've named it 'powershell.exe.config' and put it in the same folder
NC> as
NC> powershell.exe
NC> Can anyone spot why this isn't working?
NC>
NC> Thanks,
NC> n
NC> ----------------------
NC> <?xml version="1.0"?>
NC> <configuration>
NC> <system.diagnostics>
NC> <trace autoflush="true"/>
NC> <sources>
NC> <source name="System.Net" maxdatasize="9000">
NC> <listeners>
NC> <add name="TraceFile"/>
NC> </listeners>
NC> </source>
NC> <source name="System.Net.Sockets" maxdatasize="9000">
NC> <listeners>
NC> <add name="TraceFile"/>
NC> </listeners>
NC> </source>
NC> </sources>
NC> <sharedListeners>
NC> <add name="TraceFile"
NC> type="System.Diagnostics.TextWriterTraceListener"
NC> initializeData="c:\logs\pmws.log"/>
NC> </sharedListeners>
NC> <switches>
NC> <add name="System.Net" value="Verbose"/>
NC> <add name="System.Net.Sockets" value="Verbose"/>
NC> </switches>
NC> </system.diagnostics>
NC> </configuration>