dod-compliance-and-automation icon indicating copy to clipboard operation
dod-compliance-and-automation copied to clipboard

Verify vCenter version

Open daveho5392 opened this issue 1 year ago • 1 comments

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

...

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.

daveho5392 avatar Mar 31 '23 15:03 daveho5392

@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.

rlakey avatar Apr 06 '23 18:04 rlakey