VMware Cloud Community
MicroMarket
Contributor
Contributor
Jump to solution

how im can extract the value of Persistence disk of virtual machine ?

Dear Friends

how im can extract the value of persistence value of disks of virtual machine ?

im use this command bellow  , im have a if to verify if the disks are independent or not

but im want only the values of the column persistence to use in my script

Get-HardDisk -vm machine01

CapacityGB      Persistence                                                    Filename

----------      -----------                                                    --------

10,000          Persistent                   [LUN2] RJ7469SR039/RJ7469SR039.vmdk

8,000           Persistent                    [UN2] RJ7469SR039/RJ7469SR039_1.vmdk

Thanks

Almir

Reply
0 Kudos
1 Solution

Accepted Solutions
DZ1
Hot Shot
Hot Shot
Jump to solution

From your example, you just need to use Select-Object

Get-HardDisk -vm machine01 | Select Parent, Persistence


The parent is the name of the VM

View solution in original post

Reply
0 Kudos
1 Reply
DZ1
Hot Shot
Hot Shot
Jump to solution

From your example, you just need to use Select-Object

Get-HardDisk -vm machine01 | Select Parent, Persistence


The parent is the name of the VM

Reply
0 Kudos