diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_PSCustomObject.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_PSCustomObject.md index af919b85934c..fd13f2696783 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_PSCustomObject.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_PSCustomObject.md @@ -1,7 +1,7 @@ --- description: Explains the differences between the [psobject] and [pscustomobject] type accelerators. Locale: en-US -ms.date: 12/05/2022 +ms.date: 10/11/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pscustomobject?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about PSCustomObject @@ -219,7 +219,7 @@ have subtle side effects. ## Notes In Windows PowerShell, objects created by casting a **Hashtable** to -`[pscustomobject]` do not have the **Length** or **Count** properties. +`[pscustomobject]` don't have the **Length** or **Count** properties. Attempting to access these members returns `$null`. For example: @@ -236,6 +236,10 @@ PS> $object.Count PS> $object.Length ``` +Starting in PowerShell 6, objects created by casting a **Hashtable** to +`[pscustomobject]` always have a value of `1` for the **Length** and **Count** +properties. + ## See also - [about_Object_Creation][01] diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_PSCustomObject.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_PSCustomObject.md index 3286d813f4c5..0bd6e7544bc4 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_PSCustomObject.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_PSCustomObject.md @@ -1,7 +1,7 @@ --- description: Explains the differences between the [psobject] and [pscustomobject] type accelerators. Locale: en-US -ms.date: 12/05/2022 +ms.date: 10/11/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_PSCustomObject?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 title: about PSCustomObject @@ -214,7 +214,7 @@ have subtle side effects. ## Notes In Windows PowerShell, objects created by casting a **Hashtable** to -`[pscustomobject]` do not have the **Length** or **Count** properties. +`[pscustomobject]` don't have the **Length** or **Count** properties. Attempting to access these members returns `$null`. For example: @@ -231,6 +231,10 @@ PS> $object.Count PS> $object.Length ``` +Starting in PowerShell 6, objects created by casting a **Hashtable** to +`[pscustomobject]` always have a value of `1` for the **Length** and **Count** +properties. + ## See also - [about_Object_Creation][01] diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_PSCustomObject.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_PSCustomObject.md index ac8a39912be6..0cc78e3634eb 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_PSCustomObject.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_PSCustomObject.md @@ -1,7 +1,7 @@ --- description: Explains the differences between the [psobject] and [pscustomobject] type accelerators. Locale: en-US -ms.date: 12/05/2022 +ms.date: 10/11/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pscustomobject?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 title: about PSCustomObject @@ -214,7 +214,7 @@ have subtle side effects. ## Notes In Windows PowerShell, objects created by casting a **Hashtable** to -`[pscustomobject]` do not have the **Length** or **Count** properties. +`[pscustomobject]` don't have the **Length** or **Count** properties. Attempting to access these members returns `$null`. For example: @@ -231,6 +231,10 @@ PS> $object.Count PS> $object.Length ``` +Starting in PowerShell 6, objects created by casting a **Hashtable** to +`[pscustomobject]` always have a value of `1` for the **Length** and **Count** +properties. + ## See also - [about_Object_Creation][01] diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_PSCustomObject.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_PSCustomObject.md index 65d451315735..6c2fa2541286 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_PSCustomObject.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_PSCustomObject.md @@ -1,7 +1,7 @@ --- description: Explains the differences between the [psobject] and [pscustomobject] type accelerators. Locale: en-US -ms.date: 12/05/2022 +ms.date: 10/11/2023 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pscustomobject?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about PSCustomObject @@ -214,7 +214,7 @@ have subtle side effects. ## Notes In Windows PowerShell, objects created by casting a **Hashtable** to -`[pscustomobject]` do not have the **Length** or **Count** properties. +`[pscustomobject]` don't have the **Length** or **Count** properties. Attempting to access these members returns `$null`. For example: @@ -231,6 +231,10 @@ PS> $object.Count PS> $object.Length ``` +Starting in PowerShell 6, objects created by casting a **Hashtable** to +`[pscustomobject]` always have a value of `1` for the **Length** and **Count** +properties. + ## See also - [about_Object_Creation][01]