Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

New Powershell Check Version #57

Open
ThierryBT opened this issue Jun 9, 2017 · 1 comment
Open

New Powershell Check Version #57

ThierryBT opened this issue Jun 9, 2017 · 1 comment

Comments

@ThierryBT
Copy link

ThierryBT commented Jun 9, 2017

Hi Raplh and Keith and sorry for my Funny English.
During my test, I have a little problem with powershell version.
Not all powershell 5 versions are compatible with DSCEA.
For example, the 5.0.10018.0 version does not accept the "Test-DscConfiguration-ReferenceConfiguration". And DSCEA does not work (All configurations are False).
I could not test the next BUILD (5.0.10586.51) but it's Ok with the 5.0.10586.117 version.
During my tests, I used the same Framework version (4.0.30319.42000).

I have modify the Start-DSCEAscan functions.
I replaced line 279 and 280 by :
$runlist = ($psjobresults | Where-Object {$.Major -ge 5 -and $.Build -gt 10018}).PSComputername
$versionerrorlist = ($psjobresults | Where-Object {($.Major -lt 5) -or ($.Major -ge 5 -and $_.Build -le 10018)}).PSComputername
And the line 292
Write-Warning "The following systems cannot be scanned as they are not running the good Powershell Version (Greater Than 5.0.10018). Please check '$versionerrorlist' for details"
dscea
All it's Ok for my environment. If you think this is a good solution, I let you use with pleasure ;)

Regards
Thierry

@rkyttle
Copy link
Member

rkyttle commented Jun 13, 2017

Hi Thierry,

We currently check to ensure that systems are running at least PowerShell 5 because that is required to use Test-DscConfiguration -ReferenceConfiguration, but we aren't currently checking to ensure that the version of PowerShell is RTM or later.

$versionerrorlist = ($psjobresults | where-object -Property Major -lt 5).PSComputername

We'll discuss an update to this, as we need to ensure that systems aren't just at a version of 5 or higher, but that they are at least running the RTM release, version 5.0.10586.117

In your case, I assume your systems still have a preview version of WMF 5 installed and were never upgraded to the RTM release. This is something we can and should be checking for.

Thank you for bringing this up!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants