How do I Make columns in PSobject closer?


i'm using following code format below:

$tobj =  new-object psobject
$tobj | add-member -name "server" -value $server -membertype noteproperty
$tobj | add-member -name "scenario" -value $arraypwshell.scenario -membertype noteproperty 
$tobj | add-member -name "result" -value $arraypwshell.result -membertype noteproperty 
$tobj | add-member -name "error" -value $arraypwshell.error -membertype noteproperty 
$object += $tobj

$object gets populated $tobj have above.  what i'm wanting have happen have categories "server" "scenario" , on grouped closer together.  when $object outputted screen, there lot of space between each column , of text gets cut off.  how bring each column closer together?  i know there way hash tables @{"value = xx, value=xx}.  anyone know how make happen??


jctech1123, cheers

try:

$tobj | ft -auto

default output format format-table.  -autosize switch keep columns closer together, , left-justified.

[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "



Windows Server  >  Windows PowerShell



Comments

  1. Do you understand there is a 12 word sentence you can communicate to your crush... that will induce deep emotions of love and instinctual attraction to you deep within his chest?

    That's because deep inside these 12 words is a "secret signal" that fuels a man's instinct to love, please and look after you with his entire heart...

    =====> 12 Words That Fuel A Man's Desire Impulse

    This instinct is so hardwired into a man's brain that it will make him try harder than ever before to build your relationship stronger.

    Matter of fact, triggering this all-powerful instinct is so mandatory to having the best ever relationship with your man that once you send your man one of the "Secret Signals"...

    ...You'll instantly notice him expose his mind and soul to you in such a way he never experienced before and he will identify you as the only woman in the galaxy who has ever truly fascinated him.

    ReplyDelete

Post a Comment

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS