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

Jump to navigation Jump to search
→‎Storage: Minor addition
(→‎Useful CmdLets etc: Added "Storage")
(→‎Storage: Minor addition)
Line 143: Line 143:
| <code> get-vm -name "MyVM" <nowiki>|</nowiki> get-harddisk <nowiki>|</nowiki> Format-List </code>  
| <code> get-vm -name "MyVM" <nowiki>|</nowiki> get-harddisk <nowiki>|</nowiki> Format-List </code>  
| Get the vHD details for a particular VM
| Get the vHD details for a particular VM
|-
| <code> (Get-VM -name "MyVM" <nowiki>|</nowiki> Get-VMGuest).Disks </code>
| Get the HD details for a particular VM (as seen from within guest OS)
|-
|-
| <code> get-vm -Location (Get-Folder -Name "MyFolder") <nowiki>|</nowiki> get-harddisk <nowiki>|</nowiki> sort-object -Property Filename </code>  
| <code> get-vm -Location (Get-Folder -Name "MyFolder") <nowiki>|</nowiki> get-harddisk <nowiki>|</nowiki> sort-object -Property Filename </code>  

Navigation menu