Powershell.exe.config

I have seen many references to this config file for adding support for additional version of .NET.  This got me thinking about further possibilities for the config file.  Unfortunately, in my searches, I have not been able to find much about this possibility.  If you were to add additional configuration options base upon the configuration file schema for .NET framework (http://msdn.microsoft.com/en-us/library/1fk1t1t0), will it work?  For example, if you were to use the mailSettings element (http://msdn.microsoft.com/en-us/library/w355a94k.aspx), would it work?

I am not looking at using the mailSettings element, but I am curious to know if the options presented in the configuration file schema will work.

 

Thanks!

  • Unfortunately, I've no idea. The further I stay from the Framework's guts, the happier a person I am, so I haven't experimented much. I've no idea how extensively PowerShell uses the file, even. I suspect it's pretty minimal.

    Keep in mind that PowerShell.exe is just the console host; it isn't PowerShell itself. PowerShell's engine is just a big ol' .NET class, which can be hosted from within any .NET application, and the hosting application's configuration would be in effect. That said, the PowerShell.exe console host actually utilizes code that predates .NET (it's the same basic console used by Cmd.exe).