Apologizes for delays in approving comments

Apologizes for delays in approving comments

  • Comments 9

We had a bad windstorm here and most people have been without power since Thursday night.  Microsoft was closed on Friday and power got restored sometime during the weekend. 

Jeffrey Snover [MSFT]
Windows PowerShell/Aspen Architect
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

 

Leave a Comment
  • Please add 6 and 5 and type the answer here:
  • Post
  • I've been using PowerShell for ages now on XP and '2003 and have grown very attached to it - but now I've moved over to Vista RTM I miss it. Is the Vista version still on target for January?

  • > Is the Vista version still on target for January?

    Yes

    Jeffrey Snover [MSFT]

    Windows PowerShell/MMC Architect

    Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell

    Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

  • My very first comment after my very first powershell command is

    1. It's neither very backwards compatible nor does it have friendly error messages :-)

    PS C:\Documents and Settings\Bill Timmins> ?

    cmdlet ? at command pipeline position 1

    Supply values for the following parameters:

    FilterScript:

    Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert value "" to type "System.Management.Automation.ScriptBlock". Er

    ror: "Invalid cast from 'System.String' to 'System.Management.Automation.ScriptBlock'."

    At line:1 char:1

    + ? <<<<

    PS C:\Documents and Settings\Bill Timmins>

  • > It's neither very backwards compatible nor does it have friendly error messages :-)

    We strive to be both but given the example you provided - it's hard to argue that we suceeded.

    What you did was perfectly reasonable but it created a cascade of events resulting in a rotten experience.  We should fix that.  In case you care about the details:

    What is going on here is that "?" is aliased to "where" to provide a pithy way to do things like:

    ps> gps |?{$_.handles -ge 500}

    So when you just typed "?" it was the same as typing "where".  Where requires a SCRIPTBLOCK parameter so it asked for one and when you just hit ENTER, it accepted NULL or "" as input and tried to cast it to a SCRIPTBLOCK which failed and gave you the error.  

    Apologizes for that experience.  Instead of typing "?", try "help".  That should work out better for you.

    Jeffrey Snover [MSFT]

    Windows PowerShell/MMC Architect

    Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell

    Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

  • What do I gain by switching to PS from good old WSH? In WSH, I can leverage my VBScript or JavaScript syntax and provide a easy learning curve. What lang syntax is PS based on?

    Thanks

  • Here are some of the things you gain over WSH:

    - an interactive environment

    - advanced string processing and integrated regex support

    - access to all of .NET

    - simple interactive access to COM and WMI

    For example, to get access to the BIOS information, just type

    get-wmiobject win32_bios

    - the ability to interactively inspect objects in the system

    - ability to easily mix file operations, .NET operations, COM, WMI and external processes in a script with almost no effort.

    - automatic rendering of objects (no need to us scriptomatic to generate 10 lines of code just to print out an object).

    You can even embed fragments of VBScript or Javascript (or C# or VB.NET for that matter) in a PowerShell script with a little work.

    If you're interested in the motivations and some of the design drivers for PowerShell, you can download chapter 1 of my book for free from

    http://www.manning.com/powershell

    That chapter covers a lot of our motivations and rational.

    Thanks.

    -bruce

    =================================

    Bruce Payette [MSFT]

    Windows PowerShell Tech Lead

  • Thank you Bruce for the quick rundown. I will download the chapter from your book to get more ideas.

    Ying

  • Hi, Bruce,

    I downloaded the free chapter and read it. It gave good explanation on PS's design motivation, but it seems PS's design goals overlap a lot with  Windows Script Host. I agree with you that PS makes a lot of WSH work simpler. Also PS seems to have a more direct access to .NET objects. For WSH, I guess I need to write COM Callable Wrapper(CCW) to .NET library to allow  WSH access. By the way, WSH offer RegEx functionality through Script Engine that run insie it, for JScript and VBScript, they all offer RegEx supports(check out http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/05f9ee2e-982f-4727-839e-b1b8ed696d0a.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/7f6b1073-8cbb-49ed-94b6-56833ba663c5.asp)

    Is WSH going to be supported in the future?

    Thanks

    Ying

  • I'm inquiring about, why, where PowerShell, made Alias(es) for cmpatibility with Unix Shell commands did not add by default. Alias(es) to suppport commands for backward compatibility for MS-DOS users e.g.

    dir /w

    dir /p

    dir /w/p

    deltree

    undelete

    Also, various helpful application e.g.

    msd

    qbasic

    are not supported anymore, though unix commands are !!!???

Page 1 of 1 (9 items)