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

New Powershell Check Version #57

@ThierryBT

Description

@ThierryBT

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions