Powershell: align right for a column value from Select-Object in Format-Table format
        Posted  
        
            by David.Chu.ca
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by David.Chu.ca
        
        
        
        Published on 2010-04-28T17:42:47Z
        Indexed on 
            2010/04/28
            17:47 UTC
        
        
        Read the original article
        Hit count: 592
        
powershell
I have the following array value $outData with several columns. I am not sure how I align some columns right?
$outData | Select-Object `
      Name `
      @{Name="Freespace(byte)"; Expression={"{0:N0}" -f $_.FreeSpace}}, '
      .... # other colums `
 | Format-Table -AutoSize
It works fine. However, when I tried to use align for the freespace column to right:
      @{Name="Freespace(byte)"; Expression={"{0:N0}" -f $_.FreeSpace}; align="right"}, '
I got error message "Specified method is not supported". Not sure if there is any way to align the value to right?
© Stack Overflow or respective owner