By default, PowerCLI cmdlets run on the vCenter Server or VMware Cloud Director systems you are connected to, if no target servers can be determined from the provided parameters. Use the $DefaultVIServers and $DefaultCIServers variables to manage the default server connections.
When you connect to a vCenter Server system by using Connect-VIServer, the server connection is stored in the $DefaultVIServers array variable. This variable contains all connected servers for the current PowerCLI session. To remove a server from the $DefaultVIServers variable, you can either use Disconnect-VIServer to close all active connections to this server, or modify the value of $DefaultVIServers manually.
When you connect to a VMware Cloud Director system by using Connect-CIServer, the server connection is stored in the $DefaultCIServers array variable. This variable contains all connected servers for the current session. To remove a server from the $DefaultCIServers variable, you can either use Disconnect-CIServer to close all active connections to this server, or modify the value of $DefaultCIServers manually.