PowerShell Hamlet

Picking up the challenge which James set with his PowerShell Macbeth, I decided to do Hamlet. I have actually had a non-PowerShell computerized Hamlet implementation some time ago, but for James, here comes the PowerShell one:

PS C:\> Add-PSSnapin Shakespeare.Hamlet

Do you want to follow instructions from this untrusted publisher?
File Revenge.ps1xml is published by CN="The Ghost", L=Elsinore, C=DK and is not trusted on your system. Only run scripts from trusted publishers.
[V] Never trust [D] Do not trust [R] Listen once [A] Always listen [?] Help (default is "D"): R

PS C:\> Get-Characters | Start-Revenge
Confirm
Are you sure you want to perform this action?
Continuing the revenge requires performing operation "Get killed" on Target "Polonius".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y

Confirm
Are you sure you want to perform this action?
Continuing the revenge requires performing operation "Get killed" on Target "Gertrude".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A

And so on. :)

Tags: , ,

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Follow

Get every new post delivered to your Inbox.

Join 93 other followers

%d bloggers like this: