![]() |
CSV output for easier PowerShell scripting |
Post Reply
|
| Author | |
r_keith_hill
Newbie
Joined: 08 November 2006 Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: CSV output for easier PowerShell scriptingPosted: 06 April 2012 at 6:21am |
|
PowerShell has this great facility for manipulating objects. Whenever we need to script the output of a SysInternals utility we have to parse text which is brittle and ugly code. Rather than do this: $openFiles = @(handle $env:TEMP | Foreach {($_ -split ": ")[3]} | Select -Unique) I'd love to be able to do this: $openFiles = @(handle $env:TEMP -fo CSV | Import-Csv |Select Path -Unique) Edited by r_keith_hill - 06 April 2012 at 7:24am |
|
![]() |
|
cliffburger
Newbie
Joined: 06 April 2012 Location: United States Status: Offline Points: 1 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 April 2012 at 7:07am |
|
+1
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |