Skip to content

Commit 2b67416

Browse files
committed
Editorial changes
1 parent e6f7ec7 commit 2b67416

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

reference/docs-conceptual/learn/deep-dives/everything-about-hashtable.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Hashtables are really important in PowerShell so it's good to have a solid understanding of them.
33
ms.custom: contributor-KevinMarquette
4-
ms.date: 06/25/2023
4+
ms.date: 10/22/2025
55
title: Everything you wanted to know about hashtables
66
---
77
# Everything you wanted to know about hashtables
@@ -269,7 +269,9 @@ $environments.Keys.Clone() | ForEach-Object {
269269
}
270270
```
271271

272-
Do note, you cannot clone a hashtable containing a single key, that will throw an error. In such case where you want to clone the keys its better to cast the key(s) to an array instead and iterate over them.
272+
> [!NOTE]
273+
> You can't clone a hashtable containing a single key. PowerShell throws an error. Instead, you
274+
> convert the **Keys** property to an array, then iterate over the array.
273275
274276
```powershell
275277
@($environments.Keys) | ForEach-Object {

0 commit comments

Comments
 (0)