Get-VirtualDisk | Where-Object ResiliencySettingName -eq Parity

Occasional Visitor

Hello Geeks,


I'm not familiar with powershell, Can somebody help me to understand this command please. why and where and when this command will be used.

"powershell.exe -ExecutionPolicy Restricted -Command "$Res = 0; $VDisks = (Get-VirtualDisk | Where-Object ResiliencySettingName -eq Parity); if ($null -ne $VDisks) { $Res = 1 }; Write-Host 'Final result:',$Res;]"


Best Regards,



1 Reply
This command will get all the Hyper-V virtual disk which have the ResiliencySettingName property is set to Parity, and if there were any returned value from the command, it would change the variable $Res value to 1
for the ResiliencySettingName result and meaning, you can see it over here in New-VirtualDisk

If this answer helped you, please don't forget to click on Best Response.