VMware PowerCLI

The Best User Interface for your VMware Datacenter!

Fix the DefaultVIServer and DefaultVIServers variable names

From the time when the animals could still speak, the $global:DefaultVIServer and $global:DefaultVIServers variables have been a pain in the * for intellisense.

Who hasn't typed $global:def followed by a <Tab> (ISE) or <Ctrl><Space) (VSC) and ended up with $global:global:DefaultVIServer?

It looks as if these variables have been defined with "global" in the variable name, which you can check with 
dir variable: | where{$_.Name -match 'viserver'}

Unless there is a hidden purpose for this naming, I would suggest to get rid of it.

PS: both variables are in any case defined with the option AllScope.

  • Luc Dekens
  • Apr 8 2019
  • Future Consideration
  • Jun 12, 2019

    Admin response

    We'll do some investigation on this one. It happens to me even in the console :D

  • Attach files