Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RunspaceConfiguration apis to use InitialSessionState instead #85

Closed
proxb opened this issue Aug 24, 2016 · 1 comment
Closed
Assignees

Comments

@proxb
Copy link
Owner

proxb commented Aug 24, 2016

Reference PowerShell/PowerShell#2045

@proxb proxb self-assigned this Aug 24, 2016
@proxb
Copy link
Owner Author

proxb commented Aug 26, 2016

Looks like i can do something like this:

$ISS = [initialsessionstate]::CreateDefault()
$TypeFile = New-Object
System.Management.Automation.Runspaces.SessionStateTypeEntry -ArgumentList
'WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Types.ps1xml'
$FormatFile = New-Object
System.Management.Automation.Runspaces.SessionStateFormatEntry -ArgumentList
'WindowsPowerShell\Modules\PoshRSJob\TypeData\PoshRSJob.Format.ps1xml'
$ISS.Formats.Add($FormatFile)
$ISS.Types.Add($TypeFile)
$Runspace = [runspacefactory]::CreateRunspace($ISS)

proxb added a commit that referenced this issue Aug 27, 2016
@proxb proxb closed this as completed Aug 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant