vmware / dod-compliance-and-automation

Security hardening content for VMware solutions to US Department of Defense standards
Other
153 stars 61 forks source link

Verify vCenter version #148

Open daveho5392 opened 1 year ago

daveho5392 commented 1 year ago

Describe the bug

The verify vCenter version kept failing for me when written as:

If(($global:DefaultVIServers | Select-Object -ExpandProperty Version).contains("7.0"))

I had to change it to:

If(($global:DefaultVIServers | Select-Object -ExpandProperty Version).contains("7"))

Reproduction steps

  1. Run the script to see if verify version throws an error
  2. ...

Expected behavior

My environment is the following:

vCenter 7.0u3l PowerCLI 12.7 Powershell 5.1.x vmware.vsphere.ssoadmin 1.3.9

Additional context

I need to revert vCenter to 7.0u3j. I'll see if I still see this issue.

rlakey commented 1 year ago

@daveho5392 Please provide the error you were getting or the output of $global:DefaultVIServers | Select-Object -ExpandProperty Version. 7 by itself seems like it would pick up other non-7.0 versions like 6.7 or 8.0.7 potentially and versions like that.