jvierra wrote: ↑Tue Nov 14, 2017 9:36 amDo not use "AppendText". Use $textboxOutput.Lines as this will flow better.CitrixITM wrote: ↑Tue Nov 14, 2017 9:29 am Thanks, I did attempt to use out-string, but it had no effect. Below is my code. I'm surprised that it works fine in the Studio, but not fine once built. Is that normal?
$VMInfoFormated = $VMInfo | Format-Table -AutoSize | Out-String -Width 250
$textboxOutput.AppendText("$VMInfoFormated")
Output is formatted differently after build
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Output is formatted differently after build
Re: Output is formatted differently after build
Check all properties on my listbox against you properties. Make your width 1000 to be sure.
You will have to troubleshoot this as we cannot run your system.
You will have to troubleshoot this as we cannot run your system.
Re: Output is formatted differently after build
Thank you! I found that there was an out-string somewhere else so I was doing it twice. Once I added the width to the first out-string, it worked fine.
Thank you,
Brian
Thank you,
Brian
- mxtrinidad
- Posts: 399
- Last visit: Tue May 16, 2023 6:52 am
Re: Output is formatted differently after build
Curious! Can you please provide the PowerShell Studio version?
Thanks
Thanks
Re: Output is formatted differently after build
That happens. I do it to myself quite often. It is annoying and at times hard to find.
Re: Output is formatted differently after build
I'm running PowerShell Studio 2017 5.4.145.0.
I understand now why I was getting the result that I got. I do not understand why it worked in Studio and then gave different output once built.
I understand now why I was getting the result that I got. I do not understand why it worked in Studio and then gave different output once built.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Output is formatted differently after build
The host in PowerShell Studio has the width set to very wide to accommodate the width of the output window.
The packaged executable uses the default powershell settings.
The packaged executable uses the default powershell settings.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.