Has anyone worked out how to get PowerShell to use
app.config files? I have a couple of .NET DLL's I'd like to use in one of my scripts but they expect their own config sections to be present in
Cross-referencing with this thread, which helped me with the same question: Subsonic Access To App.Config Connection Strings From Referenced DLL in Powershell Script
I added the following to my script, before invoking the DLL that needs config settings, where $configpath is the location of the file I want to load:
[appdomain]::CurrentDomain.SetData("APP_CONFIG_FILE", $configpath) Add-Type -AssemblyName System.Configuration
Answer author Millerjs
Tickanswer.com is providing the only single recommended solution of the question PowerShell App.Config under the categories i.e powershell , configuration-files , . Our team of experts filter the best solution for you.