Ranger_rkm
Contributor
Contributor

PowerCLI Array Question

Hello,

I'm trying to figure out how to use an PS Array for Clusters. If anyone has done something simlar in the past, can you please help me.

Thanks,

-Mike

Here is the code that I'm working with right now.

[CODE]

#Production Cluster - Rescan All HBAs

$Cluster = @("Production", "Production-1") | Get-Cluster $Cluster | Get-VMHost | Get-VMHostStorage -RescanAllH

{CODE]

Reply
0 Kudos
LucD
Leadership
Leadership

The values for the Name parameter can not be passed via the pipeline, see the Get-Cluster help.

You can specify multiple clusternames on the Name parameter,

Get-Cluster -Name "Production", "Production-1"


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
Ranger_rkm
Contributor
Contributor

Thanks Luc. I learned something new again from you.

Take Care,

-Mike

Reply
0 Kudos