Skip to content

Commit 7d2072a

Browse files
authored
Merge pull request #41127 from markwragg/patch-1
Updated code example to get the most recently created node
2 parents c9f5161 + 3b3166f commit 7d2072a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/service-fabric/service-fabric-cluster-scale-up-down.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The steps for manually removing node state apply only to node types with a *Bron
9696
To keep the nodes of the cluster evenly distributed across upgrade and fault domains, and hence enable their even utilization, the most recently created node should be removed first. In other words, the nodes should be removed in the reverse order of their creation. The most recently created node is the one with the greatest `virtual machine scale set InstanceId` property value. The code examples below return the most recently created node.
9797

9898
```powershell
99-
Get-ServiceFabricNode | Sort-Object { $_.NodeName.Substring($_.NodeName.LastIndexOf('_') + 1) } -Descending | Select-Object -First 1
99+
Get-ServiceFabricNode | Sort-Object NodeInstanceId -Descending | Select-Object -First 1
100100
```
101101

102102
```azurecli

0 commit comments

Comments
 (0)