Difference between revisions of "Script Extracts and Examples (PowerCLI)"

Jump to navigation Jump to search
m
→‎Getting Started: Minor correction
m (→‎Getting Started: Added Syntax Highlighting)
m (→‎Getting Started: Minor correction)
Line 11: Line 11:
<source lang="powershell"> Connect-VIServer -Server <server> -User <user> -Password <pass> </source>
<source lang="powershell"> Connect-VIServer -Server <server> -User <user> -Password <pass> </source>


Once connected you can do real work with the PowerCLI, to see what's available, login to https://server/mob.  This is effectively where you end up once you've completed the <source lang="powershell"> Connect-VIServer </source> command.
Once connected you can do real work with the PowerCLI, to see what's available, login to https://server/mob.  This is effectively where you end up once you've completed the <code> Connect-VIServer </code> command.


Be aware that PowerShell commands generally return objects, rather than text, and that the textual representation of the return object is often abbreviated for simplicity.  To see the entire return for a command, pipe the result into <source lang="powershell">Format-List</source>.  To complicate matters further, some return objects contain further objects, see examples below
Be aware that PowerShell commands generally return objects, rather than text, and that the textual representation of the return object is often abbreviated for simplicity.  To see the entire return for a command, pipe the result into <code>Format-List</code>.  To complicate matters further, some return objects contain further objects, see examples below


<source lang="powershell">
<source lang="powershell">

Navigation menu