Thanks again
I just finished reading the “PowerTips Monthly Volume 6: Regular Expressions ” and understood it.
although I was playing around with it and saw that even ‘^\s*’ seem to do the job(I guess I have spaces only at the beginning)
one more question if you don’t mind regarding workflows:
is there away to combine that output into the workflow itself?
I tried to create an empty array before the foreach like:
$data=@()
and then before the actual command inside foreach I put:
$workflow:data=(Get-Counter -pscomputername $server -Counter “\Processor(_Total)\% Processor Time” -SampleInterval 10 -MaxSamples 1)
and at the end(after the foreach completes but before I close the workflow } I put:
return $data
but then I get “pscomputername is not a recognized parameter…” error
if I remove the -pscomputername inside get-counter…. it runs forever(where usually it runs for 10seconds max and gets me back the data)
Thanks in advance