![]() |
|
|
#1 |
|
Guest
Posts: n/a
|
nowrap
how can I get an output from powershell without disappearing
characters? because I have no idea how wide the displayed information is going to be I cannot define a width the command I use is Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, GrantSendOnBehalfTo I used | ft already and also tried export-csv but every time I get the same wrapped output thnx |
|
|
|
#2 |
|
Guest
Posts: n/a
|
RE: nowrap
If it appears truncated in the csv file, I'm thinking that the get-mailbox
command is returning truncated value. Can you see the full value under any circumstance? "chriske911" wrote: > how can I get an output from powershell without disappearing > characters? > because I have no idea how wide the displayed information is going to > be I cannot define a width > > the command I use is > > Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, > GrantSendOnBehalfTo > > I used | ft already and also tried export-csv but every time I get the > same wrapped output > > thnx > > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: nowrap
Leo Tohill wrote:
> If it appears truncated in the csv file, I'm thinking that the get-mailbox > command is returning truncated value. > > Can you see the full value under any circumstance? Maybe try format-long or even format-custom to check this... I'll fire up my Exchange VM in a few hours otherwise. -- Microsoft MVP - Windows PowerShell PowerGadgets MVP Blog: |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: nowrap
Leo Tohill presented the following explanation :
> If it appears truncated in the csv file, I'm thinking that the get-mailbox > command is returning truncated value. > Can you see the full value under any circumstance? > "chriske911" wrote: >> how can I get an output from powershell without disappearing >> characters? >> because I have no idea how wide the displayed information is going to >> be I cannot define a width >> >> the command I use is >> >> Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, >> GrantSendOnBehalfTo >> >> I used | ft already and also tried export-csv but every time I get the >> same wrapped output >> >> thnx >> >> >> indeed, even the output on screen does not give back the full width necessary to diplay all information is there a way to force this, be it on the screen or piped to a file? thnx |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Re: nowrap
do this test:
$x = Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, >> GrantSendOnBehalfTo $x[0].Name.Length Is the length the truncated length, or the expected length? If it's the truncated length, then the problem lies in the get-mailbox cmdlet itself. "chriske911" wrote: > Leo Tohill presented the following explanation : > > If it appears truncated in the csv file, I'm thinking that the get-mailbox > > command is returning truncated value. > > > Can you see the full value under any circumstance? > > > > "chriske911" wrote: > > >> how can I get an output from powershell without disappearing > >> characters? > >> because I have no idea how wide the displayed information is going to > >> be I cannot define a width > >> > >> the command I use is > >> > >> Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, > >> GrantSendOnBehalfTo > >> > >> I used | ft already and also tried export-csv but every time I get the > >> same wrapped output > >> > >> thnx > >> > >> > >> > > indeed, even the output on screen does not give back the full width > necessary to diplay all information > is there a way to force this, be it on the screen or piped to a file? > > thnx > > > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
Re: nowrap
Leo Tohill wrote:
> do this test: > > > $x = Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} | Select Name, >>> GrantSendOnBehalfTo > > $x[0].Name.Length > > Is the length the truncated length, or the expected length? If it's the > truncated length, then the problem lies in the get-mailbox cmdlet itself. I would think a hard coded limitation in the cmdlet would be a bad idea. This is likely much more an effect of PowerShell's formatting features. I checked: c:\program files\microsoft\exchange server\bin\exchange.format.ps1xml There is nothing specific to this object/property, so the default formatting should take effect: This would make a good blog post... Marco -- Microsoft MVP - Windows PowerShell PowerGadgets MVP Blog: |
|
|
|
#7 |
|
Guest
Posts: n/a
|
Re: nowrap
chriske911 wrote:
> indeed, even the output on screen does not give back the full width > necessary to diplay all information > is there a way to force this, be it on the screen or piped to a file? We know the output on the screen will get truncated, that's by design. The issue that Leo was raising was that you should NOT see any truncation when you use Export-CSV. If you do, that means the source data itself is already truncated, or there is some other mechanism doing that before it gets to export-csv. So just for argument's sake, can you ensure the source data has all of the characters you expect? -- Author, Tech Prosaic blog () Webmaster, Psi () Community Director, PowerShellCommunity.org Co-host, PowerScripting Podcast () |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Re: nowrap
on 25/06/2008, Hal Rottenberg supposed :
> chriske911 wrote: >> indeed, even the output on screen does not give back the full width >> necessary to diplay all information >> is there a way to force this, be it on the screen or piped to a file? > We know the output on the screen will get truncated, that's by design. The > issue that Leo was raising was that you should NOT see any truncation when > you use Export-CSV. If you do, that means the source data itself is already > truncated, or there is some other mechanism doing that before it gets to > export-csv. > So just for argument's sake, can you ensure the source data has all of the > characters you expect? yes and no, if I just use this line of code: Get-Mailbox | Where {$_.GrantSendOnBehalfTo -ne $null} |export-csv then I do get full details from the mailbox itself but I cannot get the info (sendonbehalf) I am looking for if I try to format the output in any way to get a tabular view it is always truncated grtz |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |