puppetlabs / puppetlabs/ruby-pwsh
Support Custom InitialSessionState
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 20
- Forks
- 27
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 4
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining the Pwsh::Manager options handling and the init.ps1 template where default InitialSessionState behavior is implemented. Define the supported InitialSessionState surfaces from the request, then add documentation and tests covering the options and their effects. Done means callers can configure the supported session settings through the manager options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, ruby
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100