File tree Expand file tree Collapse file tree 4 files changed +24
-8
lines changed
5.1/Microsoft.PowerShell.Core/About
7.2/Microsoft.PowerShell.Core/About
7.3/Microsoft.PowerShell.Core/About
7.4/Microsoft.PowerShell.Core/About Expand file tree Collapse file tree 4 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 11---
22description : Explains the differences between the [psobject] and [pscustomobject] type accelerators.
33Locale : en-US
4- ms.date : 12/05/2022
4+ ms.date : 10/11/2023
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pscustomobject?view=powershell-5.1&WT.mc_id=ps-gethelp
66schema : 2.0.0
77title : about PSCustomObject
@@ -219,7 +219,7 @@ have subtle side effects.
219219## Notes
220220
221221In Windows PowerShell, objects created by casting a ** Hashtable** to
222- ` [pscustomobject] ` do not have the ** Length** or ** Count** properties.
222+ ` [pscustomobject] ` don't have the ** Length** or ** Count** properties.
223223Attempting to access these members returns ` $null ` .
224224
225225For example:
@@ -236,6 +236,10 @@ PS> $object.Count
236236PS> $object.Length
237237```
238238
239+ Starting in PowerShell 6, objects created by casting a ** Hashtable** to
240+ ` [pscustomobject] ` always have a value of ` 1 ` for the ** Length** and ** Count**
241+ properties.
242+
239243## See also
240244
241245- [ about_Object_Creation] [ 01 ]
Original file line number Diff line number Diff line change 11---
22description : Explains the differences between the [psobject] and [pscustomobject] type accelerators.
33Locale : en-US
4- ms.date : 12/05/2022
4+ ms.date : 10/11/2023
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_PSCustomObject?view=powershell-7.2&WT.mc_id=ps-gethelp
66schema : 2.0.0
77title : about PSCustomObject
@@ -214,7 +214,7 @@ have subtle side effects.
214214## Notes
215215
216216In Windows PowerShell, objects created by casting a ** Hashtable** to
217- ` [pscustomobject] ` do not have the ** Length** or ** Count** properties.
217+ ` [pscustomobject] ` don't have the ** Length** or ** Count** properties.
218218Attempting to access these members returns ` $null ` .
219219
220220For example:
@@ -231,6 +231,10 @@ PS> $object.Count
231231PS> $object.Length
232232```
233233
234+ Starting in PowerShell 6, objects created by casting a ** Hashtable** to
235+ ` [pscustomobject] ` always have a value of ` 1 ` for the ** Length** and ** Count**
236+ properties.
237+
234238## See also
235239
236240- [ about_Object_Creation] [ 01 ]
Original file line number Diff line number Diff line change 11---
22description : Explains the differences between the [psobject] and [pscustomobject] type accelerators.
33Locale : en-US
4- ms.date : 12/05/2022
4+ ms.date : 10/11/2023
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pscustomobject?view=powershell-7.3&WT.mc_id=ps-gethelp
66schema : 2.0.0
77title : about PSCustomObject
@@ -214,7 +214,7 @@ have subtle side effects.
214214## Notes
215215
216216In Windows PowerShell, objects created by casting a ** Hashtable** to
217- ` [pscustomobject] ` do not have the ** Length** or ** Count** properties.
217+ ` [pscustomobject] ` don't have the ** Length** or ** Count** properties.
218218Attempting to access these members returns ` $null ` .
219219
220220For example:
@@ -231,6 +231,10 @@ PS> $object.Count
231231PS> $object.Length
232232```
233233
234+ Starting in PowerShell 6, objects created by casting a ** Hashtable** to
235+ ` [pscustomobject] ` always have a value of ` 1 ` for the ** Length** and ** Count**
236+ properties.
237+
234238## See also
235239
236240- [ about_Object_Creation] [ 01 ]
Original file line number Diff line number Diff line change 11---
22description : Explains the differences between the [psobject] and [pscustomobject] type accelerators.
33Locale : en-US
4- ms.date : 12/05/2022
4+ ms.date : 10/11/2023
55online version : https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pscustomobject?view=powershell-7.4&WT.mc_id=ps-gethelp
66schema : 2.0.0
77title : about PSCustomObject
@@ -214,7 +214,7 @@ have subtle side effects.
214214## Notes
215215
216216In Windows PowerShell, objects created by casting a ** Hashtable** to
217- ` [pscustomobject] ` do not have the ** Length** or ** Count** properties.
217+ ` [pscustomobject] ` don't have the ** Length** or ** Count** properties.
218218Attempting to access these members returns ` $null ` .
219219
220220For example:
@@ -231,6 +231,10 @@ PS> $object.Count
231231PS> $object.Length
232232```
233233
234+ Starting in PowerShell 6, objects created by casting a ** Hashtable** to
235+ ` [pscustomobject] ` always have a value of ` 1 ` for the ** Length** and ** Count**
236+ properties.
237+
234238## See also
235239
236240- [ about_Object_Creation] [ 01 ]
You can’t perform that action at this time.
0 commit comments