Productivity Tools

Tools written by an IT business manager, a passionate developer.

PowerShell Master Configuration

The module allows to store configuration for the PowerShell in one single file.

To use it you need to have set up an environment variable MasterConfigurationPath to the directory where you would like to store a configuration.

Environment Variable

In the given directory you need to have a JSON configuration file.

Configuration file

Configuration should be in a simple JSON format with the configuration in the key-value pair.

  "Login": "14561018",




To make setup easy, the module exposes the cmdlet which allows creating a directory and a file for configuration. Invoking Set-MasterConfiguration will:


To use the module call Get-MasterConfiguration with key.


If you would like to see all config values, use -All switch. The same effect you will achieve without any parameter.


Module is based on MasterConfiguration NuGet package. For .NET application it is also needed to set up additional Environment Variable ASPNETCORE_ENVIRONMENT but in PowerSher Master Configuration this parameter is not mandatory as module force to use MasterConfiguration.

Refresh the PowerShell session

If you would open the code, during Set-MasterConfiguration I set up two environment variables for Machine and for Process. This is a consequence of a way how PowerShell managing Environment Variables: