Skip to content

Commit 21a0a34

Browse files
(MicrosoftDocsGH-10780) Fix example in about_Intrinsic_Members (MicrosoftDocs#10784)
Prior to this change, `about_Intrinsic_Members` defines examples that describe a hashtable and interacts with a variable containing the hashtable but doesn't define the hashtable itself in the code blocks. The examples also use `-Type` with the `Get-Member` cmdlet, which is an alias for the paramter canonically named **MemberType**. This change: - Defines the `$hash` variable in the first code block for the example, ensuring readers can follow along without needing to intuit the definition from the output. - Replaces usage of the `-Type` alias parameter with the canonical parameter name **MemberType**, making it easier for readers to look up the parameter. This also adheres to the docs style guide. - Resolves MicrosoftDocs#10780 - Fixes AB#198703
1 parent 4e1414e commit 21a0a34

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes automatic members in all PowerShell objects
33
Locale: en-US
4-
ms.date: 08/21/2023
4+
ms.date: 01/10/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_Inrinsic_Members?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Intrinsic_Members
@@ -59,7 +59,12 @@ The **Force** parameter of `Get-Member` shows us the intrinsic members of the
5959
object.
6060

6161
```powershell
62-
$hash | Get-Member -Force -Type MemberSet, CodeProperty
62+
$hash = @{
63+
Age = 33
64+
Name = 'Bob'
65+
}
66+
67+
$hash | Get-Member -Force -MemberType MemberSet, CodeProperty
6368
```
6469

6570
```Output
@@ -114,7 +119,7 @@ the **PSCustomObject**. The new properties are now part of the `psextended`
114119
**MemberSet**.
115120

116121
```powershell
117-
$user | Get-Member -Force -Type MemberSet, CodeProperty
122+
$user | Get-Member -Force -MemberType MemberSet, CodeProperty
118123
```
119124

120125
```Output

reference/7.2/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes automatic members in all PowerShell objects
33
Locale: en-US
4-
ms.date: 08/21/2023
4+
ms.date: 01/10/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_Inrinsic_Members?view=powershell-7.2&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Intrinsic_Members
@@ -59,7 +59,12 @@ The **Force** parameter of `Get-Member` shows us the intrinsic members of the
5959
object.
6060

6161
```powershell
62-
$hash | Get-Member -Force -Type MemberSet, CodeProperty
62+
$hash = @{
63+
Age = 33
64+
Name = 'Bob'
65+
}
66+
67+
$hash | Get-Member -Force -MemberType MemberSet, CodeProperty
6368
```
6469

6570
```Output
@@ -114,7 +119,7 @@ the **PSCustomObject**. The new properties are now part of the `psextended`
114119
**MemberSet**.
115120

116121
```powershell
117-
$user | Get-Member -Force -Type MemberSet, CodeProperty
122+
$user | Get-Member -Force -MemberType MemberSet, CodeProperty
118123
```
119124

120125
```Output

reference/7.3/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes automatic members in all PowerShell objects
33
Locale: en-US
4-
ms.date: 08/21/2023
4+
ms.date: 01/10/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_Inrinsic_Members?view=powershell-7.3&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Intrinsic_Members
@@ -59,7 +59,12 @@ The **Force** parameter of `Get-Member` shows us the intrinsic members of the
5959
object.
6060

6161
```powershell
62-
$hash | Get-Member -Force -Type MemberSet, CodeProperty
62+
$hash = @{
63+
Age = 33
64+
Name = 'Bob'
65+
}
66+
67+
$hash | Get-Member -Force -MemberType MemberSet, CodeProperty
6368
```
6469

6570
```Output
@@ -114,7 +119,7 @@ the **PSCustomObject**. The new properties are now part of the `psextended`
114119
**MemberSet**.
115120

116121
```powershell
117-
$user | Get-Member -Force -Type MemberSet, CodeProperty
122+
$user | Get-Member -Force -MemberType MemberSet, CodeProperty
118123
```
119124

120125
```Output

reference/7.4/Microsoft.PowerShell.Core/About/about_Intrinsic_Members.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes automatic members in all PowerShell objects
33
Locale: en-US
4-
ms.date: 08/21/2023
4+
ms.date: 01/10/2024
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_Inrinsic_Members?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Intrinsic_Members
@@ -59,7 +59,12 @@ The **Force** parameter of `Get-Member` shows us the intrinsic members of the
5959
object.
6060

6161
```powershell
62-
$hash | Get-Member -Force -Type MemberSet, CodeProperty
62+
$hash = @{
63+
Age = 33
64+
Name = 'Bob'
65+
}
66+
67+
$hash | Get-Member -Force -MemberType MemberSet, CodeProperty
6368
```
6469

6570
```Output
@@ -114,7 +119,7 @@ the **PSCustomObject**. The new properties are now part of the `psextended`
114119
**MemberSet**.
115120

116121
```powershell
117-
$user | Get-Member -Force -Type MemberSet, CodeProperty
122+
$user | Get-Member -Force -MemberType MemberSet, CodeProperty
118123
```
119124

120125
```Output

0 commit comments

Comments
 (0)