/\/\o\/\/ PowerShelled

This blog has moved to http://ThePowerShellGuy.com Greetings /\/\o\/\/
$AtomFeed = ("Atom.xml")
$PreviousItems = (" Timing the loading of your profile in MSH "," Tuning MSH in your Profile "," Einstein 2 + subtopic. "," Burn MSH ?? "," Monad and Adam (and a preview of my to-be AD provi... "," Windows MineSweeper cheat "," erroraction on new-item, my Wrong use of Stringbui... "," MSH Minesweeper GUI game "," MSH get-WmiMethodHelp (GWM) Update + format tips. "," More on Cryptograpy and MSH "," ")

Saturday, November 26, 2005


Running (Un-block) a downloaded script in MSH

I got a comment of Lee Holmes, on last post. Tipping that you can also use time-expression, to time operations in MSH.


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) :


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\/\/

Anonymous Anonymous
Unfortunately, this is a limitation of the API that we use to determine the "remoteness" of a file. The workaround steps you discovered are actually covered in about_signing:

"In order to run this
script, open Windows Explorer and locate the file. Right-click on the
file, select "Properties," and then click the "Unblock" button at the
bottom right of the properties dialog that opens. Restart your MSH
shell, and the script will execute."
Post a Comment

<< Home


October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006  

$Links = ("PowerShell RC1 Docs"," PowerShell RC1 X86"," PowerShell RC1 X64"," Monad GettingStarted guide"," Monad Progamming Guide"," Monad SDK"," Monad videos on Channel 9"," MSH Community Workspace"," scripts.readify.net "," MonadSource"," www.reskit.net"," PowerShell Blog"," Under The Stairs"," computerperformance powershell Home"," proudlyserving"," MSH on wikipedia"," MSHWiki Channel 9"," Keith Hill's Blog"," Precision Computing"," PowerShell for fun"," MSH Memo (Japanese)"," monadblog")

find-blog -about "PowerShell","Monad" | out-Technorati.
find-blog -contains "","" | out-Technorati.
Web mow001.blogspot.com

This page is powered by Blogger. Isn't yours?