By default, PowerCLI cmdlets run on the vSphere servers you are connected to, if no target servers can be determined from the provided parameters.

When you connect to a vSphere server 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.