All of my clusters are SQL AAGs and Exchange DAGs. Therefore, no CSVs.
This is a 2-step discovery process. First you find out the data on the
resultant object
gm –i (Get-ClusterSharedVolume | Get-ClusterOwnerNode)
Then you select the results
Get-ClusterSharedVolume | Get-ClusterOwnerNode | select itamA,
itemB
If your results are in a sub-object, then you may need to expand that FIRST
Get-ClusterSharedVolume | Get-ClusterOwnerNode | select –Expand
subObject | select itemA, itemB
Standard Power-Shelling ☺
From: [email protected] [mailto:[email protected]] On
Behalf Of Justin Thomas
Sent: Wednesday, July 16, 2014 1:06 PM
To: [email protected]
Subject: Re: [NTSysADM] Powershell Help
Hmmm, that completes and gives me info, but not quite what I'm looking for.
This doesn't show ownership.
PS C:\Users\justin.thomas> Get-ClusterSharedVolume | Get-ClusterOwnerNode | % {$
_.CLusterObject.Name; $_.OwnerNodes} | Format-List
Cluster Disk 10
Name : HOK-55SVR
Id : 5
State : Up
Name : HOK-56SVR
Id : 1
State : Up
and so on, through the other 9 resources and 3 other nodes.
On Wed, Jul 16, 2014 at 10:18 AM, Crawford, Scott
<[email protected]<mailto:[email protected]>> wrote:
While waiting for a guru to chime in, how does this look?
Get-ClusterSharedVolume | Get-ClusterOwnerNode | % {$_.CLusterObject.Name;
$_.OwnerNodes} | Format-List
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>]
On Behalf Of Justin Thomas
Sent: Wednesday, July 16, 2014 9:12 AM
To: [email protected]<mailto:[email protected]>
Subject: [NTSysADM] Powershell Help
I need to view the owners of clustered resources. I can enter this command
Get-ClusterSharedVolume | Get-ClusterOwnerNode
and it returns most of the answer, with two nodes scrolling off the screen...
I tried
Get-ClusterSharedVolume | Get-ClusterOwnerNode |fl
and it got better, but I still cannot see it all
I got a suggestion to try this:
Get-ClusterSharedVolume | Get-ClusterOwnerNode |export-csv c:\owners.csv
but what I get looks like this, which makes me think the command isn't quite
right, or complete
#TYPE Microsoft.FailoverClusters.PowerShell.ClusterOwnerNodeList
"ClusterObject","OwnerNodes"
"Cluster Disk
10","System.Collections.ObjectModel.Collection`1[Microsoft.FailoverClusters.PowerShell.ClusterNode]"
"Cluster Disk
2","System.Collections.ObjectModel.Collection`1[Microsoft.FailoverClusters.PowerShell.ClusterNode]"
Any thoughts?
Thanks
--
Probable Contrarian
--
Probable Contrarian