>The Select-Object cmdlet is probably what you want. It has -First, -Last,
>-Skip, -Index, etc which you can use to step in to an array
Cool,
Is there any way to clean this up, I get an error when I consecutively pipe the
$SnapOutput_Log and $GUID_Log lines together?
$SnapOutput = start-job { vshadow `-wi=`{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7`}
-p D: E: }
Wait-Job $SnapOutput
$SnapOutput_Log = Receive-Job $SnapOutput -Keep |Select-String -SimpleMatch
"$VolID_Log" -Context 4,0
$GUID_Log = ([regex]::Matches($SnapOutput_Log, "SNAPSHOT.*\{(.*)\}.*") |
%{$_.Groups[1].value})
Write-Host "$GUID_Log"
Obviously I am missing something here, this errors out:
$GUID_Log = Receive-Job $SnapOutput -Keep |Select-String -SimpleMatch
"$VolID_Log" -Context 4,0 |([regex]::Matches($_, "SNAPSHOT.*\{(.*)\}.*") |
%{$_.Groups[1].value})
Thanks guys!
jlc
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~