# Tab completion for PSCustomObject

**URL:** <https://forums.powershell.org/t/tab-completion-for-pscustomobject/894>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/tab-completion-for-pscustomobject/894 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/tab-completion-for-pscustomobject/894/1 "2011-12-31T18:30:00Z")

</div>

by stromnessian at 2013-04-23 13:10:22

> Hi  
>   
> I’m sure there must be a good reason for this, but why, when I try to create a custom object in v3.0 by starting the command:  
>   
> `$obj = [pscust`  
>   
> then try to TAB complete, it completes as [psobject] and when I add a hash table with the desired properties, the resultant object is a hash table? If I want a PSCustomObject, it seems I have to complete the full type name. (Sorry, being picky here, but I don’t like typing!!)  
>   
> Many thanks

by poshoholic at 2013-04-23 21:02:34

> That seems like a bug due to how tab completion works in PowerShell and due to the fact that the [pscustomobject] type is actually a special-case [psobject] that PowerShell’s interpreter treats differently.  
>   
> You can see why tab completion is doing what it does by invoking this command:  
> `[pscustomobject].FullName`  
> Compare that to:  
> `[psobject].FullName`  
> That illustrates that [pscustomobject] is actually [psobject]. It provides for a little bit of syntactic magic when it comes to object creation with hash tables.  
>   
> If it’s a bug that you really want to see fixed, you should open a bug report on Microsoft Connect and encourage others to vote it up.

by stromnessian at 2013-04-24 00:23:12

> Thanks, Kirk.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:02pm UTC](https://forums.powershell.org/t/tab-completion-for-pscustomobject/894/2 "2024-05-16T21:02:45Z")

</div>

Closed on May 16, 2024, 9:02pm UTC


