Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Powershell v2 - Add Row numbers to each row in Formated output

$
0
0

Hi All,

Am trying to add numbering to each Row of the object output of the select command. As in below

Get-Process |Select ProcessName,Thread 

ac.sharedstore                                {1808, 1820, 1824, 1832...}                  
accrdsub                                      {3960, 5200, 5812, 5816...}                  
acevents                                      {1868, 1916, 1936, 1940...}                  
acevents                                      {3256, 1216, 5428, 5444...}                  
acsagent                                      {2808, 792, 4912, 4864...}                   
AESTSr64                                      {2032, 2044, 416, 1080...}                   
Agent                                         {7000, 4604, 548, 2752...}                   


I am expecting numbering to be added to each output before the ProcessName so it looks neat. How can i achieve this.

When exporting to CSV it is perfect we can guess that with the excel numbering , but exporting to HTML gives the difficulty.



S.Arun Prasath HP ARDE TEAM


Viewing all articles
Browse latest Browse all 2562

Trending Articles