This is my DefaultParameter module. I created it primarily to let me store default parameter values like Out-File:Encoding
and my Publish-Module:NuGetApiKey
...
You can install it from the PowerShell gallery:
Install-Module DefaultParameters
Then you can do something like this:
Set-DefaultParameter Out-File Encoding utf-8
Export-DefaultParameter
If you Export-DefaultParameter, your whole $PSDefaultParameterValues
hashtable is exported, and by default it goes in your profile folder. Whenever the DefaultParameter module is imported, the file in that default location file is imported, but you can manually specify the path if you like.
The Disable-DefaultParameter
command actually disables all the default parameter values, and this setting is part of the import/export...