bairstowscott
Contributor
Contributor

help with powercli error message

Jump to solution

$path = @()

$cluster = 'cluster_01'

$parent = Get-View $cluster.ExtensionData.ResourcePool

while ($parent.parent){ 

    $parent = Get-View $parent.parent

    $path += $parent.Name

}

Why am I getting this error message?

Capture.PNG

0 Kudos
1 Solution

Accepted Solutions
mattboren
Expert
Expert

Hello, -

The problem there is that you are making the cluster variable a string value, rather than something that represents a cluster object.

Instead of the previous line (the 2nd line), try it like:

$cluster = Get-Cluster 'cluster_01'

Then the third line should succeed.  That do it for you?

View solution in original post

0 Kudos
1 Reply
mattboren
Expert
Expert

Hello, -

The problem there is that you are making the cluster variable a string value, rather than something that represents a cluster object.

Instead of the previous line (the 2nd line), try it like:

$cluster = Get-Cluster 'cluster_01'

Then the third line should succeed.  That do it for you?

0 Kudos