Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Measure-Object Doesn't Like Me

$
0
0

Blame the tool, not the craftsman, right? What I'm attempting to do is add some extra flare to my progress bars. The status bars I use now show what item number it's on and the total item count, nothing special.

What I'm looking to do is add an "Estimated Time To Completion"notification as well.

I started playing around with Measure-Command and making a small test script to get the bugs worked out. And of course, I have a bug. Below is the test script. I keep getting

Measure-Object : Input object "" is not numeric.

even though I have tried to explicitly define what type of variable is in the array. The average time is going to be multiplied by the number of items left, then added to the current time to come up with the estimated completion time.

Any thoughts, or am I just crazy for trying?

Powershell
$TimerArray=@()For($i=1;$i-le10;$i++)...

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>