PowerCLI question

by GeorginaHowland at 2012-12-14 07:52:36

is there a powerCLI command that informs the user they are connected to a <server/servers>
PowerCLI C:&gt; get-vm cbs* | measure-object
Count : 419
Average :
Sum :
Maximum :
Minimum :
Property :

PowerCLI C:&gt; (What command would i type to determine which server i am retriving info from)

I would have posted this in the PowerCLI forum however there was no post-topic button to click
by aadkins1964 at 2012-12-17 11:52:56
The current server is stored in the $DefaultVIServer variable, would that be what you are looking for (just type $defaultviserver and hit enter in PowerCLI)?
by Makovec at 2012-12-17 12:00:44
Check this thread for PowerCLI questions.

David
by DonJ at 2013-01-02 07:27:39
Functions also have an -ErrorAction and -ErrorVariable parameter. You could try that.