diff --git a/PoshRSJob/PoshRSJob.psd1 b/PoshRSJob/PoshRSJob.psd1 index aabb5f2..ec39cad 100644 --- a/PoshRSJob/PoshRSJob.psd1 +++ b/PoshRSJob/PoshRSJob.psd1 @@ -1,7 +1,7 @@  # # PoshRSJob -# Version 1.5.7.0 +# Version 1.5.7.1 # # Boe Prox (c) 2014 # http://learn-powershell.net @@ -14,7 +14,7 @@ ModuleToProcess = 'PoshRSJob.psm1' # Version number of this module. -ModuleVersion = '1.5.7.0' +ModuleVersion = '1.5.7.1' # ID used to uniquely identify this module GUID = '9b17fb0f-e939-4a5c-b194-3f2247452972' diff --git a/PoshRSJob/Public/Start-RSJob.ps1 b/PoshRSJob/Public/Start-RSJob.ps1 index 640c587..c3e8f0c 100644 --- a/PoshRSJob/Public/Start-RSJob.ps1 +++ b/PoshRSJob/Public/Start-RSJob.ps1 @@ -233,7 +233,11 @@ Function Start-RSJob { } } $RunspacePool = [runspacefactory]::CreateRunspacePool($InitialSessionState) - $RunspacePool.ApartmentState = 'STA' + Try { + #ApartmentState doesn't exist in Nano Server + $RunspacePool.ApartmentState = 'STA' + } + Catch {} [void]$RunspacePool.SetMaxRunspaces($Throttle) If ($PSVersionTable.PSVersion.Major -gt 2) { $RunspacePool.CleanupInterval = [timespan]::FromMinutes(2) diff --git a/README.md b/README.md index b88673c..9a2f976 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -PoshRSJob 1.5.7.0 +PoshRSJob 1.5.7.1 =================== [![Build status](https://ci.appveyor.com/api/projects/status/svrd4ho4otugki24?svg=true)](https://ci.appveyor.com/project/proxb/poshrsjob) diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index f05626f..6b97c18 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,5 +1,5 @@ --------- -|1.5.7.0| +|1.5.7.1| --------- * Fixed Issue #64 (HadErrors in PoshRS.PowerShell.RSJob throws errors in PowerShell V2) * Fixed Issue #67 (Converted Add-Type code for C# classes to be created via Reflection for Nano server support) <- Created custom dll @@ -7,3 +7,4 @@ * Fixed Issue #63 (Replaced Global variables with Script scope) * Fixed Issue #66 (Parameters don't work with PowerShell V2) * Fixed Issue #65 (Bug with v2 variable substitution - single-quoted strings get $var references replaced) +* Fixed Issue #68 (ApartmentState Does Not Exist in Nano)