Welcome to MSDN Blogs Sign in | Join | Help

New PowerShell Bloggers Jim Truher, Abhishek Agrawal

We have two new PowerShell Bloggers.

Jim Truher is program manager in our team. He is one of co-designer of PowerShell scripting language.  You can read his blog at

http://spaces.msn.com/jtruher

 

Abhishek Agrawal is test lead in our team.  He also launched his blog at spaces. You can read his blog at

http://spaces.msn.com/abhishek225

Welcome to PowerShell blogging guys!

Posted by arulk | 0 Comments

Development opportunities in Windows PowerShell Team

Windows PowerShell, previously codenamed Monad, is Microsoft’s next generation shell. It forms a large part of the Windows Server Division’s future, and we are hiring! We have two openings in our development team for strong individual contributors to help us plan and deliver future releases. Do you want to help create an amazing Windows management experience? See below for more information. If you are interested, please send me email.

L63 SDE

L61 SDE

L63 SDE

Are you tired of hearing that the UNIX command line is better than Windows’? If so, then work with us as we develop Microsoft’s next generation command shell – codenamed "Monad".

Our mission is to make Windows the most easily managed operating system for IT administrators. Although we are still in beta -our first version ships in August 2006, - the project has already developed a passionate following. To quote one customer: "Comparing Monad to Bash or any of the UNIX shells is the difference between shooting a bullet and throwing it."

Here are some of the scenarios we enable:
· Command line navigation of not just the file system -- but of Active Directory, SQL, WMI, the Windows Registry, and more.
· Powerful command composition through an object-based pipeline
· Seamless interoperability with the .NET Framework
· Consistent command line syntax and online help
Effective scripting and command-line management is one of Microsoft’s key opportunities to both lower the TCO of Windows, and to help us compete with Linux and UNIX.
Partners are quickly jumping at this opportunity. The next release of Microsoft Exchange -E12- incorporates Monad deeply as one of its most important new features. The next versions of Microsoft Operations Manager and other server products also include broad support for administration via Monad.

As we continue our drive towards V2, we have enormous opportunities in production -level scripting, remoting, building GUIs on top of cmdlets, and more. The road ahead is clear – come help us make Windows the most manageable operating system on the planet!

Technically, the ideal candidate has experience with Windows programming at both the system level and the application level. You have a good knowledge of architecture, object-oriented design and development, and possess solid architecture, coding, and debugging skills. You are fluent in C#, the .NET CLR and frameworks. It is ideal (but not required) that you have experience with UNIX shells -sh/csh/ksh/bash- or scripting languages like PERL, Python, or Ruby You have a BS in Computer Science or a related technical field.

Personally, you demonstrate leadership skills and experience on cross group collaboration. You have five or more years of development experience shipping large-scale commercial software, and a proven record of driving for results.

 

L61 SDE

If someone tells you that the UNIX command line is better than Windows, your answer should be "It’s so 2005!"
Monad is Microsoft’s next generation command line shell, built using .Net technologies. Our mission is to make Windows the most easily managed operating system for IT administrators. Here are some of the scenarios we enable:
· Command line navigation of not just the file system -- but of Active Directory, SQL, WMI, the Windows Registry, and more.
· Powerful command composition through an object-based pipeline.
· Seamless interoperability with the .NET Framework.
Monad V1.0, which releases in the last quarter of this year, has great adoption from both internal and external partners. The next release of Microsoft Exchange (E12) incorporates Monad deeply as one of its most important new features. The next versions of Microsoft Operations Manager also include broad support for administration via Monad, with more teams to come.
Now is a great time to join us as we start to plan our next release, which will provide you with significant opportunities for both career and technical growth. Amongst other things, version 2 will include a platform that enables customers to easily write graphical user interfaces on top of monad commands. Our goal is to have all new management UIs coming from the Windows Server group built using this platform. We are adding powerful functionality for remotely managing individual machines to large data centers, and are building a brand new console using WinForms/Avalon, which will have all the bells and whistles in the world. We have lot to accomplish in V2, and we are looking for motivated individuals to help us achieve our mission.
We are looking for people who are results-oriented; enjoy learning new technologies and care about the success of their product. Technically, candidates should have strong design skills and very strong C++ or C# coding and debugging skills. Experience with the .Net framework is desirable but not required. Experience with UNIX shells (sh/csh/ksh/bash) or scripting languages like PERL, Python, or Ruby is a strong plus but not required. You should have two or more years of development experience shipping large-scale commercial software.

Posted by arulk | 1 Comments

Welcome to Windows PowerShell (Monad)

In his keynot address at MMS 2006, Bob Muglia, Senior Vice President, announced the product name for Monad.  Monad will be called Windows PowerShell.  We are also announcing the public availability of our RC1 drop in the download center.

You can get the latest drop by clicking on the links below

    X86 PowerShell latest build: http://go.microsoft.com/fwlink/?linkid=64772&clcid=0x409 

    X64 PowerShell latest build: http://go.microsoft.com/fwlink/?linkid=64773&clcid=0x409  

   PowerShell documentation: http://go.microsoft.com/fwlink/?linkid=64774&clcid=0x409 .

 

We are launching a new team blog at http://blogs.msdn.com/powershell

 

The following are key messages delivered in Bob's keynot address

·         PowerShell is both a command line shell and a scripting language for system administration.

·         Microsoft is announcing Windows PowerShell as the new name for Windows code-named “Monad” Shell  (also known as Microsoft “Command Shell” or “MSH”).

·         Microsoft is announcing Windows PowerShell in Q4 of 2006. PowerShell will be available as a web download via Microsoft.com/downloadcenter.

·         Microsoft is announcing the release of RC1 of Windows PowerShell

·         Exchange 2007 and System Center Operations Manager 2007 (Microsoft Operations Manager “V3”) will be built upon Windows PowerShell

·         Exchange 2007 demonstrates the next generation Windows administration experience by integrating Windows PowerShell and a Microsoft Management Console (MMC) graphical user interface.

 

 This is a key milestone for Windows PowerShell.  We look forward to hearing feedback from you.

 

-Arul

 

Posted by arulk | 5 Comments

Monad on Hanselminutes Show

Hanselminutes is a weekly audio talk show with noted web developer and technologist Scott Hanselman and hosted by Carl Franklin.  In this week’s radio show, Hanselman talk about Monad.  Click here to listen to the show. He has also written a blog on Monad.   

 

Welcome to Monad Scott.

Posted by arulk | 0 Comments

COM support in Monad

I was reading Tony’s Blog MSHFORFUN  about using Microsoft Text to Speech engine to output using voice.  He created an Interop assembly for Microsoft TTS com object and used the resulting .Net assembly to do voice output.  Monad provides great support for .Net classes and in many cases, generating Interop assembly is the only way to access unmanaged components.   However, there are cases where this is not needed.  The above example is one of them.

 

Monad provides great support for creating and using COM objects.  You can create a COM object using the same new-object cmdlet that you use for .Net objects. You do this by specifying –ComObject parameter with the ProgID of the COM object you want to create.

 

For Example:

    Let us create Internet explorer application and have it navigate to a particular website.

 

$ie = new-object -comobject Internetexplorer.application

$ie.Navigate2("http://www.microsoft.com")

$ie.visible=1

 

    This creates a new Internet Explorer application COM object.  Invokes a method and sets a property on the COM object.

 

 

Determining what methods and properties are supported in a COM object is a snap using get-member cmdlet.

 

MSH C:\Scripts\> $fso = new-object –com scripting.filesystemobject

MSH C:\Scripts\> $fso | get-member

 

 

   TypeName: System.__ComObject#{2a0b9d10-4b87-11d3-a97a-00104b365c9f}

 

Name                             Member           Type Definition

----                               ----------                        ----------

BuildPath                       Method             string BuildPath (string, string)

CopyFile                        Method             void CopyFile (string, string, bool)

CopyFolder                    Method             void CopyFolder (string, string, bool)

CreateFolder                 Method             IFolder CreateFolder (string)

CreateTextFile              Method             ITextStream CreateTextFile (string, bool, bool)

DeleteFile                      Method             void DeleteFile (string, bool)

DeleteFolder                  Method             void DeleteFolder (string, bool)

DriveExists                    Method             bool DriveExists (string)

FileExists                      Method             bool FileExists (string)

FolderExists                  Method             bool FolderExists (string)

GetAbsolutePathName    Method              string GetAbsolutePathName (string)

GetBaseName                Method             string GetBaseName (string)

GetDrive                       Method             IDrive GetDrive (string)

GetDriveName               Method             string GetDriveName (string)

GetExtensionName        Method             string GetExtensionName (string)

GetFile                          Method             IFile GetFile (string)

GetFileName                 Method             string GetFileName (string)

GetFileVersion               Method             string GetFileVersion (string)

GetFolder                      Method             IFolder GetFolder (string)

GetParentFolderName    Method              string GetParentFolderName (string)

GetSpecialFolder            Method             IFolder GetSpecialFolder (SpecialFolderConst)

GetStandardStream   Method              ITextStream GetStandardStream (StandardStreamTypes, bool)

GetTempName              Method             string GetTempName ()

MoveFile                       Method             void MoveFile (string, string)

MoveFolder                   Method             void MoveFolder (string, string)

OpenTextFile                Method             ITextStream OpenTextFile (string, IOMode, bool, Tristate)

Drives                          Property            IDriveCollection Drives () {get}

 

 

 

 

Now, coming back to using TTS engine, we could rewrite Tony’s script as follows:

 

begin

{  

    $SpVoice = new-object -com SAPI.SpVoice

    $count = 0

   

}

process

{

    if ($_)

    {

       $count++

       $StringToSay = $_ | out-string

       "$count: $StringToSay"

  

        $SpVoice.Speak($StringToSay)

    }

    else

    {

       "null object"

    }

}

end

{

  "Number of objects successfully output: $count"

}

 

 

I have removed the code that saves the voice output to a file, but it is easy to add that functionality to the above code.  This code creates the Speech API’s SpVoice COM object directly, for each object coming through the pipeline, converts the object to string, and uses the Speak method on COM object to do Voice output.

 

Try it out!

 

There is one caveat with using COM objects in Monad though.   In VBScript or JavaScript, You can release a COM object by setting the variable to null.  Scripting engine underneath calls the Release method on the COM object to decrement the reference count and when the reference count reaches zero, COM object is released.   In managed world, releasing COM object is not deterministic.  COM object is released when the variable holding the COM object is garbage collected.  This might be ok in many cases, but there are cases where we need to release the COM object immediately.  .Net framework provides a way to solve this problem.  You can use

 

System.Runtime.InteropServices.Marshal.ReleaseComObject()

 

to release the COM object.  However,  I do not recommend this.    .Net framework Interop layer maintains only one reference count on the underlying COM object regardless of how many managed clients refer to that object.  When you call ReleaseComObject, underlying COM object is released regardless of the number of clients.  These other clients of COM object will get InvalidComObjectException when they try to invoke a method or access a property.  Be careful when you use this approach and be sure that you are releasing the last reference to the COM object.

 

 

Monad is theonly scripting platform that provides access to .Net, WMI, COM in a well-integrated manner. Enjoy the power but use it with caution. J

 

 

 

 

 

 

 

 

Posted by arulk | 1 Comments

Monad cheat sheet for cmd.exe users

 Many people in windows environment are cmd.exe users. This cheat sheet will help these users to move to Monad shell easily by showing cmd.exe equivalents in Monad.

 

I will keep this blog uptodate as I discover commands for which users are struggling.

 

 

 

CMD.EXE

Monad Equivalent

cd

set-location

cd

cd c:\temp

set-location c:\temp

cls

clear-host

cls

copy con

function copycon {

    [system.console]::in.readtoend()

}

 

 

copy con foo.txt

copycon | set-content foo.txt

dir

get-childitem

dir

dir /ad

get-childitem | where { $_.MshIsContainer }

dir | where { $_.MshIsContainer }

dir /od

get-childitem | sort-object LastWriteTime

dir | sort LastWriteTime

dir /o-d

get-childitem | sort-object LastWriteTime -desc

dir | sort LastWriteTime -desc

pushd

push-location

popd

pop-location

start .

invoke-item  .

ii .

 

Posted by arulk | 5 Comments

Monad Beta3 available.

I wish everyone happy new year. We had a fantastic 2005 in Monad team. We delivered multiple betas to our customers and we finished the year with our feature complete milestone.

 

Monad beta3 which contains our feature complete bits is ready. You can download the bits at the following locations

 

x86: http://www.microsoft.com/downloads/details.aspx?FamilyID=e8e5203a-574c-4105-af6b-b2fef39adf55&displaylang=en

x64: http://www.microsoft.com/downloads/details.aspx?FamilyID=9fe1977d-3de2-47c2-b0ba-62339bcd505a&displaylang=en

docs: http://www.microsoft.com/downloads/details.aspx?FamilyID=6387c46b-4753-4eaf-8d8b-368074f39ccc&displaylang=en

 

 

This release contains support for our new snapin model which allows cmdlets to be developed and distributed easily.

 

I will start to post more on the features of monad in coming blogs.

 

Please send us your feedback using public newsgroup.

 

Happy Scripting !

Posted by arulk | 1 Comments

Monad portal in script center

Most scripters are familar with Microsoft script center.  Script center now has a portal for Microsoft Command Shell.  You can access the portal at http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

 

-Arul

 

Posted by arulk | 0 Comments

Announicing public availability of Monad Beta

Folks,

  Monad beta is now publicly available as part of  WinFx beta release.   You can get this beta at the following location

 

http://www.microsoft.com/downloads/details.aspx?FamilyID=23a22468-5807-4ff7-a363-ce6fe69b8f04&DisplayLang=en

 

 

Posted by arulk | 0 Comments

Difference between $() and ()

 Today, I was writing some script to play around hash declaration.   My line of script to declare hash was

 

MSH>$a = @{(‘foo’ + ‘bar’) = 5)}

MSH>$a.foobar

5

MSH>

Then, I tried

 

MSH>$a = @{$(‘foo’ + ‘bar’)=5}

MSH>$a.foobar

5

MSH>

 

That worked too.  So, what’s the difference between  ()  and $()

 

Answer is () is used only for expressions whereas $() is used for statement list.  The above example works because ‘foo’ + ‘bar’ is treated as statement in $() case.

 

To clarify the point

 

MSH>$a = @{ $( $a=’foo’ ;   $a += ‘bar’ ;  $a) = 5}

MSH>$a.foobar

5

MSH>

 

The above  will work fine.  However,

 

MSH> $a = @{ ( $a=’foo’ ;   $a += ‘bar’ ;  $a) = 5}

 

will fail because  parser expects an expression, but  finds  a statement list.

Posted by arulk | 2 Comments

Monad WebCast

Jeffrey Snover, our architect, is going to give a web cast on Monad.  Please mark your calendars and attend these events.  You will get tons of information on Monad

 

TechNet Webcast: Next Generation Command Line Scripting using Monad (Part 1 of 2)
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032277850&Culture=en-US



TechNet Webcast: Next Generation Command Line Scripting using Monad (Part 2 of 2)
http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032277852&Culture=en-US

Posted by arulk | 1 Comments

Monad Beta1 Released

After nearly nine months, the Monad team has released Beta 1 of the
Microsoft Command Shell. Although initially promised for release at the end
of the month, the Monad team has worked hard to release Beta1 to BetaPlace
ahead of schedule!

To download the new bits, please visit BetaPlace at
http://beta.microsoft.com

The Monad team and I look forward to your feedback!

Thanks for all of your support,
Posted by arulk | 3 Comments

Wait is Over. Monad beta available

Time has finally arrived for people to get their hands on  new Microsoft Command Shell Code named Monad.  We will be releasing a beta version of Monad at our betaplace and  it will be available for download on June 21st. 

Please see my blog  Where to get Monad?  for details

I will start to write more about Monad in coming days. 

Posted by arulk | 0 Comments

Where to get Monad?

Monad is currently in development.  A preview is available for those who are interested.

To get Monad Preview

1. go to http://beta.microsoft.com

2. login using  guestid mshPDC

3. You will get information to download the monad bits.

Posted by arulk | 3 Comments

How to determine Monad version?

if you are running Monad and would like to determine the version of Monad you are running  then you can determing the version by doing the following

 

MSH>$host.version

Major  Minor  Build  Revision
-----    -----    -----  --------
1          0         224    0

 

This returns the version information.

Posted by arulk | 1 Comments
 
Page view tracker