- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something like this?
$vmName = 'MyVM'
Get-VM -Name $vmName |
Get-HardDisk |
Select Name,FileName,@{N='Datastore';E={$_.FileName.Split(']')[0].TrimStart('[')}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference