Get-ActiveSyncDevice Format-Table UserDisplayName truncated

by Peter-Kriegel at 2013-02-19 22:40:21

Hi Guys !

I don´t ask this question for myself! But i can´t remember any Problem that could not be resolved with PowerShell, so I am Interested in, to get rid of this BUG!
I the German TechNet Forum and in the Netherland was asked this question:
German Thread:

even in the Active Directory Management Tool | Active Roles there is a unsolved Thread about this problem:

If the User does a call of "Get-ActiveSyncDevice|Format-Table UserDisplayName, DeviceType, DeviceOS" the UserDisplayName is always truncated by a length of 64 Characters!
If the User call this with Format-List the UserDisplayName gets NOT truncated!

The User say even the following Call does not solve this issue:
Get-ActiveSyncDevice|Format-Table UserDisplayName, DeviceType, DeviceOS -Autosize |Out-String -Width 4096

The User say that even $FormatEnumerationLimit Variablen with full length don´t solve this.

The User say that even Custom Tables with a Hash-Table with Key "width" don´t solve this

Any one a new idea ?
by mjolinor at 2013-02-20 14:47:49
Does this work an better?

Get-ActiveSyncDevice |
Select-Object UserDisplayName, DeviceType, DeviceOS |
Format-Table -Autosize
by Peter-Kriegel at 2013-02-21 03:12:49
Hi Mjolinor!

thank you for your reply !
But this is even truncated!
The User has extracted the UserDisplayname from the DistinguishedName

Get-ActiveSyncDevice | %{$result=$.DistinguishedName.Split("=");$result=$result[3].Replace(",OU","");$result=$result.Replace("",""); $result $.DeviceModel}

No well string processing, but he is satisfied…!