microsoft / DSCEA

DSC Environment Analyzer (DSCEA) is a simple implementation of PowerShell Desired State Configuration that uses the declarative nature of DSC to scan systems in an environment against a defined reference MOF file and generate compliance reports as to whether systems match the desired configuration.
https://microsoft.github.io/DSCEA
Other
197 stars 41 forks source link

Increase timeout on PS Version check on Start-DscEaScan #20

Closed rkyttle closed 7 years ago

rkyttle commented 7 years ago

Adding this for discussion, it looks like the PS Version check timeout is currently hardcoded to 120 seconds

$psresults = Invoke-Command -ComputerName $firstrunlist -ErrorAction SilentlyContinue -AsJob -ScriptBlock { $PSVersionTable.PSVersion } | Wait-Job -Timeout 120 $psjobresults = Receive-Job $psresults

rkyttle commented 7 years ago

Also near this section is the following: $firstrunlist = (Get-Content $$InputFile)

Adding to this thread to remind for discussion on why there are multiple $ on this item

krjhitch commented 7 years ago

I think that's a typo, not sure that could run. Does the integration testing include a computers file run?

rkyttle commented 7 years ago

It does, and it passed on testing. Will try a manual test.

rkyttle commented 7 years ago

Looks like my integration test logic didn't catch it, it does error. The double $ needs to be removed, and I don't see why the ( ) is needed either

rkyttle commented 7 years ago

Looks like it was just a typo introduced at #13 I'm happy to commit a change but looking to get your thoughts on the need for ( ) It seems we have had those in for a while but I don't think they are needed on this line

krjhitch commented 7 years ago

Agree, good find on the copy-paste error (surprised it runs).

Also agree, don't need the ( ) in this case