It initializes the script.
This block only executes the first time a it is run like this.
Subsequent calls will be ignored.

It registers the basic string input type validator
This is the default example for modules using the configuration system.
Note: While the -Handler parameter is optional, it is important to add it at the initial initialize call, if you are planning to add it.
Only then will the system validate previous settings (such as what a user might have placed in his user profile)

-Name

Name of the configuration entry.
If an entry of exactly this non-casesensitive name already exists, its value will be overwritten.
Duplicate names across different modules are possible and will be treated separately.
If a name contains namespace notation and no module is set, the first namespace element will be used as module instead of name.
Example:
-Name “Nordwind.Server”
Is Equivalent to
-Name “Server” -Module “Nordwind”

-Module

This allows grouping configuration elements into groups based on the module/component they serve.
If this parameter is not set, the configuration element must have a module name in the name parameter (the first segment will be taken, irrespective of whether that makes sense).

-Validation

The name of the validation script used for input validation.
These can be used to validate make sure that input is of the proper data type.
New validation scripts can be registered using Register-PSFConfigValidation

-Hidden

Setting this parameter hides the configuration from casual discovery.
Configurations with this set will only be returned by Get-Config, if the parameter “-Force” is used.
This should be set for all system settings a user should have no business changing (e.g.
for Infrastructure related settings such as mail server).

-Default

Setting this parameter causes the system to treat this configuration as a default setting.
If the configuration already exists, no changes will be performed.
Useful in scenarios where for some reason it is not practical to automatically set defaults before loading userprofiles.

-Initialize

Use this when setting configurations as part of module import.
When initializing a configuration, it will only do a thing if the configuration hasn’t already been initialized (So if you load the module multiple times or in multiple runspaces, it won’t make a difference)
Also, if there already was a non-initialized setting set for a given configuration, it will then try to set the old value again.
This value will be processed by handlers, if any are set.

-DisableHandler

This parameter disables the configuration handlers.
Configuration handlers are designed to automatically process input set to a config value, in addition to writing the value.
In many cases, this is used to improve performance, by forking the value location also to a static C#-field, which is then used, rather than searching a Hashtable.
Normally these shouldn’t be circumvented, but just in case, it can be disabled.

-PersistedValue

In most circumstances an internal parameter.
Applies the serialized value to a setting.
Used for restoring data from configuration files that should only be deserialized when the module consuming it is already imported.