question

CocoCocovi-4679 avatar image
0 Votes"
CocoCocovi-4679 asked LimitlessTechnology-2700 answered

Why is Get-partition returning info from all the 3 nodes of my cluster

I'm working on a requirement to get the partition information of each cluster node individually. However, in PowerShell, the command below on a given node is returning the list from all the nodes versus just one at a time.

$info = Get-Partition | Where-Object {$_.AccessPaths -eq "E:\"}


PS C:\Windows\system32> $info = Get-Partition | Where-Object {$_.AccessPaths -eq "E:\"}

PS C:\Windows\system32> $info


DiskPath: \\?\Disk{2740e7d4-c28f-a28f-6835-9dc252a44426}

PartitionNumber DriveLetter Offset Size Type


2 E 33619968 991.88 MB Basic


DiskPath: \\?\Disk{44cc5b7d-7c1b-2c4d-4e1b-7351302b1ec6}

PartitionNumber DriveLetter Offset Size Type


2 E 33619968 991.88 MB Basic


DiskPath: \\?\Disk{81dff6cd-e0de-b804-c1fc-55846380bbe3}

PartitionNumber DriveLetter Offset Size Type


2 E 33619968 991.88 MB Basic


How do I restrict the output to just one node please or is there a filter I can add to the command?
Thank you.
Coco

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
1 Vote"
LimitlessTechnology-2700 answered

Hello @CocoCocovi-4679,

Thank you for your question and reaching out. My name is Prakash and I’d be more than happy to help you with your query.


You can use below PowerShell command to get list of partition of remote computer or Node.



Get-CimInstance -ComputerName Node1 -ClassName Win32_LogicalDisk -Filter "DriveType = 3"

Get-CimInstance -ComputerName Node2 -ClassName Win32_LogicalDisk -Filter "DriveType = 3"

Get-CimInstance -ComputerName Node3 -ClassName Win32_LogicalDisk -Filter "DriveType = 3"




--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.