This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
I got a comment of Lee Holmes, on last post. Tipping that you can also use time-expression, to time operations in MSH.
eg:
time-Expression {sleep 1}
Seconds : 1
Milliseconds : 5
time-Expression {sleep 1}
Seconds : 1
Milliseconds : 3
time-Expression {sleep 1}
Seconds : 0
Milliseconds : 999
(the output contains more (day,s hours etc., but I let it out here)
it also shows a good example of the "Caching" I mentioned about in last blog, if you do the same action a couple of times it get quicker. (last example even a bit to quick ;-)
after looking at his blog and finding Part 2 of the Burn-Console series, I also posted about before :
burn-console.msh Part II - A working implementation , I think I did see, why he is into timing also ;-), you will see if you look there.
but to get back to the topic,
ofcource, I was eager to try his new Example, I downloaded it (the TXT file as pasting gives some troubles) , removed the .TXT part and started it (at least tried to) :
MSH>.\burn-console-1.working.msh
The file G:\Monad\burn-console-1.working.msh cannot be loaded. The file G:\Monad\burn-console-1.working.msh is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details..
At line:1 char:28
+ .\burn-console-1.working.msh <<<< href="http://mow001.blogspot.com/2005/10/codesigning-in-monad-shell-beta-2-for.html">CodeSigning in Monad" Shell Beta 2 (for .NET Framework 2.0 RC/RTM) ,
b.t.w. that will bring you also to Lee Holmes Blog, for a good item about this.
so I had to Un-Block it first (as Monad does know I got it from the internet)
"hmm did think, I did not even tell my mother that, but ok ...;-)":So I did right-click the file in explorer, and yes there was the Unblock button.
I unlocked the file, and did try to start it again.
same error.
???
But after starting a new MSH shell, Monad did know I "accepted" that script and did start it for me.
So it seems that this get's not updated / inspected again in the "live" MSH shell, you have to start a new shell to be able to start the script.
if you know it it's not that bad, but it can be confusing, so I hope this is a beta thingie.
Enjoy your downloaded (and startable) MSH scripts
gr /\/\o\/\/