-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
Use Case
As a developer leveraging the PowerShell Manager, I want to be able to preload the manager's Session State with needed options, such as (but not limited to):
- Session Configuration
- Module Import
- Variables
- Execution Policy
- Language Mode
- Startup Scripts
- Transcript Directory
- Command allow list
Describe the Solution You Would Like
Extension of the options
hash for the Pwsh::Manager
which allow users to specify InitialSessionState overrides from default which are implemented in the init.ps1
template file.
Something like:
options = {
initial_session_state: {
execution_policy: 'Unrestricted',
import_psmodules_from_path: ['C:\path\to\foo.psd1', 'C:\path\to\bar.psd1'],
session_configuration_file_path: 'C:\path\to\configuration.pssc'
},
}
With a set list of supported surfaces, documentation, and testing.