.NET types

In response to the recent Days till Xmas post, applepwc asked the question    >  where can I find more “.NET types”?I mean is there a list of “.NET type”  available in monad? Excellent question but there are a number of aspects to it so let’s break it down: .NET is a developer platform.  That platform contains a…

3

Monad cmdlet cleanup update

As Jeffrey mentioned in an earlier Blog “Finding which parameters are used the most” The Monad team is in the process of cleaning up our cmdlets to promote a more consistent user experience. The following two areas which we are focused on might have impact on you:   Cmdlet Verb names consistency and Parameters naming…

7

Days till Xmas

My daughter loves christmas.  She often asks me, “how long is it till christmas?”  The problem with that is that I’m one of those people that can barely remember what year it is much less the date.  Well, it is one thing to be a flawed person and its another thing to disappoint your daughter. …

6

Finding which parameters are used the most

We are in the process of cleaning up our Cmdlets and ensuring that they are consistent.  One of the things we want to do is the ensure that we provide Aliases for ParameterNames.  As a general rule, parameternames are not pithy.  That is great for reading scripts but can be a pain during interactive sessions. …

4

Invoking Scriptblocks from C#

Last time somebody asked for an example of a C# method that took a scriptblock.  First of all, there’s one very important thing you have to know about scriptblocks as they are currently implemented.  They can’t be invoked outside of a runspace.  Any attempt to do so will result in an exception.  Some of you…

1

Minding Path Inputs in a Cmdlet

When I was a Monad neophyte, I was asked to write a Cmdlet taking a file path as a parameter. A big mistake I made was not keeping in mind that in Monad the FileSystem provider was just one of the many providers. (This makes Monad different from many other shells where you are always…

7

Adding help for cmdlets in a MshSnapIn

Now that you know how to create an MshSnapIn, you might want to add help content for all those cmdlets that you developed and get them displayed by “get-help” cmdlet.  To add help content you must know how a Monad Cmdlet Help file looks. See any of the *-Help.xml files in Monad installation directory for reference….

1

Single Shell vs Custom Shell

With Monad Beta 3 release, we’ve introduced the concept of the “single shell”. What is a single shell? “One shell to rule them all … and in the darkness…” (Sorry I can’t stop saying that quote everytime I hear “single shell”!) Well rather than having to create a separate executable/shell to host your own cmdlets/providers,…

2

Ensuring Script Portability with #requires

With the MshSnapIn model in Beta 3, there is no gaurantee that a certain Cmdlet or Provider, apart from those in the default MshSnapIns, is available at any point. There could be a number of reasons. The MshSnapIn may not have been installed. The MshSnapIn could be removed with the remove-mshsnapin Cmdlet or not even added yet. This will cause scripts using the unavailable…

4

Mshsnapin (part 2): developing a mshsnapin.

To develop a mshsnapin, you can use following three simple steps, Create a class derived from MshSnapIn class. Build an assembly to contain the mshsnapin class created in step1 and also other cmdlet/provider classes to be included in the mshsnapin. Install the mshsnapin assembly created in step2 using installutil.exe. Following is the sample code for a mshsnapin…