PowerShell Cookbook

Search

Categories

 

On this page

Archive

Blogroll

Disclaimer
I work for Microsoft.

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 222
This Year: 0
This Month: 0
This Week: 0
Comments: 536

Sign In

 Tuesday, April 25, 2006
Tuesday, April 25, 2006 3:53:34 PM (Pacific Daylight Time, UTC-07:00) ( )

Bob Muglia’s Microsoft Management Summit (MMS) keynote this morning unveiled a series of exciting announcements surrounding Monad – now known as Windows PowerShell:

This marks a significant milestone in the Windows PowerShell product lifecycle, and brings us an important step closer to getting a finished product in your hands.

The MMS announcement (and updated beta) will also bring many more users into our community.  If you’re one of them, welcome!  Here are some helpful “getting started” resources (thanks to Bob Wells for collecting these!)


Microsoft TechNet Script Center
===============================
  
http://www.microsoft.com/technet/scriptcenter/default.mspx

   Scripting with the Microsoft Shell
  
http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Webcasts
========
   Next Generation Command Line Scripting with Monad (Part 1 of 2)
  
http://msevents.microsoft.com/cui/eventdetail.aspx?eventID=1032277850&Culture=en-US

   Next Generation Command Line Scripting with Monad (Part 2 of 2)
  
http://msevents.microsoft.com/cui/eventdetail.aspx?eventID=1032277852&Culture=en-US

Miscellaneous
=============
   Articles:
      "Monad: The Future of Windows Scripting", by Thomas Lee
      TechNet Magazine, November o December 2005, Scripting Column
     
http://www.microsoft.com/technet/technetmag/issues/2005/11/Scripting/default.aspx

      "A guided tour of the Microsoft Command Shell", by Ryan Paul
     
http://arstechnica.com/guides/other/msh.ars

   Blogs:
      PowerShell Team Blog
     
http://blogs.msdn.com/PowerShell/

      Arul Kumaravel's Blog
      http://blogs.msdn.com/ArulK

      Precision Computing: Software Design and Development (Lee Holmes' blog)
     
http://www.leeholmes.com/blog/default.aspx

     
   Books:
      Monad
      Introducing the MSH Command Shell and Language
      by Andy Oakley
      First Edition December 2005
      ISBN: 0-596-10009-4
      206 pages, $34.95 US, $48.95 CA, £24.95 UK
     
http://www.oreilly.com/catalog/msh/

   Newsgroups:
      Microsoft Windows Server Scripting
     
nntp://microsoft.public.windows.server.scripting

   Sample Scripts:
      The Monad Script Centre
     
http://www.reskit.net/monad/samplescripts.htm

   Videos:
      Channel 9 Forums >> The Videos >> Jeffrey Snover >> Monad explained
     
http://channel9.msdn.com/ShowPost.aspx?PostID=25506

      Channel 9 Forums >> The Videos >> Jeffrey Snover >> Monad demonstrated
     
http://channel9.msdn.com/ShowPost.aspx?PostID=25915

      Channel 9 Forums >> The Videos >> Jeffrey Snover >> More talking about Monad
     
http://channel9.msdn.com/Showpost.aspx?postid=127819

   Wikis:
      Wikipedia
     
http://en.wikipedia.org/wiki/MSH_(shell)

      Channel 9 MSH Wiki
     
http://channel9.msdn.com/wiki/default.aspx/Channel9.MSHWiki

   Additional Resource Listings (like this list, only different):
      Monad-MSH
     
http://www.reskit.net/monad

 

[Edit: Monad has now been renamed to Windows PowerShell. This script or discussion may require slight adjustments before it applies directly to newer builds.]

Comments [5] | | # 
Tuesday, April 25, 2006 4:57:07 PM (Pacific Daylight Time, UTC-07:00)
Hi Lee,

i love monad! But i have one issue -

i am used to have several shell (cmd.exe) windows open, running under different security contexts, e.g. i run as a normal user, but i have a admin cmd.exe open where i drag and drop programs from the desktop or startmenu (e.g. .lnk) files to start them using elevated privileges.

This works fine with cmd.exe, but not with monad...this is a major show-stopper for me...

is there a workaround for that?

thanks!
dominick, DevelopMentor
Tuesday, April 25, 2006 5:03:51 PM (Pacific Daylight Time, UTC-07:00)
I don't run as Administrator either, Dominick, and I do this every day -- what doesn't work for you?
Tuesday, April 25, 2006 5:37:56 PM (Pacific Daylight Time, UTC-07:00)
hi,

lets say i drag and drop a VS2005 from my start menu to a monad window, i get this:

MSH C:\etc
> "C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Visual Stud
io 2005\Microsoft Visual Studio 2005.lnk"

and when i hit enter - the string is just echoed to the console...
Tuesday, April 25, 2006 6:23:13 PM (Pacific Daylight Time, UTC-07:00)
Ahh, this is because strings are a direct data type in Monad.

For example:

PS C:\temp> 1234
1234
PS C:\temp> 5 * 5
25
PS C:\temp> 0x1234
4660
PS C:\temp> "Hello World"
Hello World

and your issue,
PS C:\temp> "c:\temp\myProgram.exe"
"c:\temp\myProgram.exe"

You want to invoke that string, though, in which case you would use the "&" syntax:

& "c:\temp\myProgram.exe"

Lee
Thursday, April 27, 2006 7:21:01 AM (Pacific Daylight Time, UTC-07:00)
thanks!
Name
E-mail
Home page

Comment (Some html is allowed: b, blockquote@cite, em, i, strike, strong, sub, super, u)  

Enter the code shown (prevents robots):