Base64 Encode/Decode a string

Today I came across http://scripts.readify.net/  . This sight is focused on Monad and MSH and is starting a collection of scripts at: http://scripts.readify.net/Scripts.aspx .  You should visit their site and let them know what type of scripts would be useful to you.  I particularly liked their entry on how to Base64 encode a file.  This is…

10

GetObject()

Monad provides a way to create new com objects with new-object $ie = New-Object -ComObject InternetExplorer.Application$ie.Navigate2(http://blogs.msdn.com/monad)$ie.Visible=1 Great but what about if you want to bind to an existing object?  Where is the equivalent of GetObject()? This is one of those good new/bad news stories.  First the bad news.  Monad does not provide a Cmdlet that…

3

Finding out what determines which properties are displayed

MoW, a Monad newsgroup regular, asked why only the Caption, Name and PeakUsage properties were displayed from the command “get-WMIObject Win32_PageFileUsage” while the output object had a lot more properties. I think it is worth it to explain in details how to find out which properties are displayed.First, I would look at which view defined…

4

Dynamically loading assemblies in mshsnapins.

In Monad, mshsnapins can be installed in a different directory from the Monad executables. At runtime, the Monad engine will load the mshsnapin assembly and its referenced assemblies based on application base information provided during mshsnapin installation. If an mshsnapin itself dynamically loads an assembly through an assembly name or a relative path, however, CLR may not…


Working with Sort-Object Cmdlet

In this blog I will try to explain different features of sort-object(Sort) cmdlet. For the purpose of this blog, I assume the following objects exist:   MSH C:\temp\monad> $a,$b,$c,$d                                     Score Name                                   —– —-                                     100 John                                      90 Henry                                      90 Tom                                      80 David     From the definition Sort looks…

1

Exclude, Include, Filter Parameters – How to make sense of these

So how come we have three ways to filter a path in most of the core cmdlets such as in the get-item cmdlet.  It is important to understand that exclude, include, and filter offer different levels of filtering.   So let’s give a few examples of how get-item cmdlet works with these parameters individually and…

2

How to Access or Modify StartUp Items in the Window Registry

Some applications launch themselves whenever you start your computer and load Windows.  In most cases, this is the desired behavior.  However in some instances, malicious programs such as spyware, Trojans, worms, viruses load in this manner and hijack your computer. It is important to stay vigilant and periodically monitor your startup registry keys and delete…

6

The worlds easiest way to create/install MshSnapins

Hopefully you’ve read the previous entries on how to create MshSnapins to include your own cmdlets/providers without having to create an entire separate executable (custom shell). If you didn’t or if you did and you don’t feel like writing the extra MshSnapin class to be used by InstallUtil.exe, you’re in luck. I wrote a little…

4

Monad breaking change announcement: Approved verb names enforcement.

In order to prevent a mass usability nightmare with developers picking their own improvised cmdlet verbs, the Monad team, based on customer feedback, decided to enforce the use approved verbs.   The idea is to provide a more uniform and consistent interface to the end user. If a user needs to get something, he or…

30

Write-Progress

Tony has a very cool series of Monad-oriented blog entries at: http://mshforfun.blogspot.com/ .  I was fascinated by this one: http://mshforfun.blogspot.com/2005/12/ncbi-blastn-under-msh-command-line.html  which exposes the NCBI BLAST tool via a command line.  Tony’s log explains what this tool does but what I found so cool was that it submitted a query for a Website, waited for results, retrived those…

3