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

Jump to navigation Jump to search
→‎Useful CmdLets etc: Added "Storage"
(→‎Virtual Machine: Added a couple)
(→‎Useful CmdLets etc: Added "Storage")
Line 124: Line 124:


=== ESX Host ===
=== ESX Host ===
{|cellpadding="2" cellspacing="0" border="1"
{|cellpadding="2" cellspacing="0" border="1"
! Command    !! Description
! Command    !! Description
Line 136: Line 135:
| <code> Get-ScsiLun -VMHost esxt1* -LunType disk <nowiki>|</nowiki> Get-ScsiLunPath </code>  
| <code> Get-ScsiLun -VMHost esxt1* -LunType disk <nowiki>|</nowiki> Get-ScsiLunPath </code>  
| Get ESX SCSI paths info
| Get ESX SCSI paths info
|}
=== Storage ===
{|cellpadding="2" cellspacing="0" border="1"
! Command    !! Description
|-
| <code> get-vm -name "MyVM" <nowiki>|</nowiki> get-harddisk <nowiki>|</nowiki> Format-List </code>
| Get the vHD details for a particular VM
|-
| <code> get-vm -Location (Get-Folder -Name "MyFolder") <nowiki>|</nowiki> get-harddisk <nowiki>|</nowiki> sort-object -Property Filename </code>
| Get the vHD details for all VM’s in a folder (sorted by VMDK path)
|}
|}


Navigation menu