- Posted by jbrinkman on April 21, 2008
The OpenForce Call for Speakers was scheduled to end today, however due to some issues with the original session submission forms we have decided to extend the call for speakers submission date. Please submit all session proposals by 5PM PST on Friday April 25th.
We have a lot of great sessions already submitted but we want to make sure that all speakers have an opportunity to get their session proposals submitted. If you are having any problems with the session submission, please send me an email and we'll take care of it promptly.
- Posted by Admin on January 27, 2008
Well after my scare in December, I got back in the shop in January for some new woodturning projects. It started with a custom made detail gouge that I created as part of a turn and learn session at the January Buckeye Woodworker and Wood Turners meeting. As usual, it was another great meeting. I had a chance to meet and talk with Dave Hout who started the club back in '92 and currently has a woodturning show on the DIY Network. I actually got back into woodturning after seeing several of Dave's shows, so it was kinda neat to get a chance to talk with him for a few minutes and get a few pointers. In fact the design for the detail gouge is Dave's creation.
I must say that after several months of attending the BWWT and the North Coast Wood Turners clubs, that I am finally getting more confident in my turning skills. I still have a lot to learn but I am getting better with every project.
Before Christmas I had started work on a set of pens to give as presents. Unfortunately, I ran out of time to get them done for Christmas. After running into some difficulties with a pepper grinder on my ShopSmith, I was lucky enough to get a brand new Nova 1624 lathe for my birthday. In return I agreed to make some pen and pencil sets for my in-laws. Well, now that I had a new lathe, I decided to finish up the pen set I had started in December.
I think the pens turned out great. I can definitely see some differences, both in my attention to detail when sanding and in the quality of my finishes.
I have some great projects in the work for February. Hopefully I'll find a few more hours to get in the shop. With everything going on with DotNetNuke lately, finding spare time is getting a bit difficult. BWWT and NCWT are having an art showing this summer and I hope to get my skills to the point where I can get a piece or two in the show. So the month of February will be spent perfecting some ideas I have before I start on the actual show pieces.
- Posted by Admin on January 2, 2008
As those who have followed my blogs for the past couple of years know, besides computers, I love working with wood. I have had my own wood shop in the basement for the past 6 years and when I have some free time I love to go down and put my more creative side to work. I have often heard developers debating about whether programming is an art or a science or a bit of both. I have personally spoken to many different programmers throughout the years and have found that many people in our field have a strong passion for creative endeavors, whether it is painting, music or even woodworking. I think it is a natural extension of the creativity a developer uses when programming. It is much more than a mere technical exercise of taking a set of specs and turning them into a completed application.
One of my joys for the past several years has been creating Christmas gifts for family and friends. For the past two years, this has primarily been woodturning projects. I love woodturning because I can go from a concept to a completed project in less than a weekend. As my skills have improved, I am getting to the point where I can turn a complete project in a single day.
This year for Christmas, I decided to make my wife a set of matching salt and pepper grinders. Unfortunately, this project turned out to be a little more complicated and required more precision that I was able to squeeze out of my meager woodturning equipment and skills. So I fell back to a project I knew I had the skill and equipment to complete.
I had purchased a piece of Amboyna Burl about a year and a half ago. I had been saving this piece of wood until my skills had improved, since turning burl is a little more challenging. The swirling wood grain, bark inclusions and embedded dirt can be hard on the tools and can make getting a decent cut difficult. Also, since Amboyna burl is very expensive (this small 6 x 6 x 3 inch block was over $80), I didn't want to turn it unless I thought my skills were up to the task. It is a beautiful wood, but too expensive for practicing my woodturning.
My skills had been steadily improving this past year so I decided to go for it. Once I got going, I was able to rapidly (ok - rapid is a relative term since I am sure I was quite slow compared to many other turners in my local woodturning clubs) define the shape and get my bowl to its finished shape. Just a little bit of sanding and a few coats of lacquer and in less than 6 hours I had gone from a hunk of wood to a beautiful bowl that my wife would be delighted to place on the mantel above the fireplace.
I think the bowl turned out great. I need to do a little buffing yet to really get the finish completed, but overall, the wife was extremely delighted.
All did not go without a hitch though. It turns out that I am allergic to either the wood or something that was in the wood. When turning, wood chips are flying everywhere. The get in your shirt, in your face and hair and even like to nestle in the little crevice behind the ear. While I was turning, I noticed that I was getting a little itch behind my right ear. I didn't think anything of it. I brushed away the wood chips and dust and continued turning. As the afternoon wore on, the itch turned into a mild burning. My ear was definitely getting a little sensitive, but I persevered.
Well, after the better part of an afternoon I finished my task and had a bowl worthy of a Christmas gift to my wife. When I went upstairs to shower up, I noticed that I had a rash and hives all over my face and a little bit on my hands. It didn't appear too bad so I didn't think too much of it. By the next morning, my hands and face were on fire. I had developed large blisters behind both ears and I was in pretty bad shape. For the next week I struggled to heal from what appeared to be a bad bout of poison ivy. My hands had gotten so bad that I could barely type. Fortunately, after about 6 days, most of the blisters and hives had disappeared, leaving a few itchy patches, a little swelling and some nasty looking red blotches on my hands.
This episode has taught me that I need to pay better attention to what is going on when I am turning. I love working with exotic woods, but since I know I have a wide range of plant allergies, it would probably be prudent to take more safety precautions and wear more protective gear when working with new woods. Thank goodness that it wasn't any more serious.
- Posted by Admin on January 1, 2008
I have been a fan of Rob Connery's work on SubSonic for a while now. As readers of my blog know, I have also been exploring PowerShell quite a bit lately as well. Recently, I had a need to update a DotNetNuke module to PowerShell 2.0.3. Unfortunately, some of the APIs had changed between SubSonic 1.x and 2.x. Because of the desire to keep the module Medium Trust compatible I don't use the build-provider and instead pre-generate my DAL.
In the past I had used the sample web app to generate the classes for just those tables needed for my module. In this iteration, I decided to go the SubCommander route and generate the needed classes from the command-line. The SubSonic web-site has a batch file to handle this task, but I decided to use a command line that didn't date back to my college days. While the batch file is a workable solution, it really is showing its age, especially when compared with PowerShell.
SubCommander is an extremely powerful tool and has dozens of options and command-line parameters. Using it can be a daunting task. Fortunately, using a command-line script can significantly simplify the API, and when combined with the tab expansion features in PowerShell Plus makes it trivial to use.
So I fired up PowerShell Plus and created the New-DAL function.
function global:get-sqluser($username="", $password="", [switch]$forcesecure) {
# We are creating an object to which we'll add custom properties
$user = New-Object object | select-object UserName, Password
if ($username.length -eq 0) {
# No username was specified, so we should use Get-Credential to prompt for a user
# We also define a default username in order to suppress console output
# The results are added as synthetic properties to the PSObject we created above
$cred = Get-Credential "SqlUser"
$user.UserName = $cred.GetNetworkCredential().Username
if ($forcesecure)
{
$user.Password = $Cred.Password
}
else
{
$user.Password = $cred.GetNetworkCredential().Password
}
} else {
$newpassword = $password
# If we are using secure passwords, then we need to convert our string to a securestring
if ($forcesecure)
{
$newpassword = New-Object System.Security.SecureString
[char[]]$password | for-each {$newpassword.AppendChar($_)}
}
# In this case we can just create synthetic properties using the values passed to the function
$user.UserName = $username
$user.Password = $newpassword
}
# Return our synthetic object
$user
}
# This function uses SubSonic to generate the Data Access Layer.
function global:New-Dal(
$server = "localhost",
$db,
$username = "",
$password = "",
$namespace = "Test" ,
$lang = "vb",
$BuildPath = "D:\Batch\DAL",
$SonicPath = "D:\Program Files\SubSonic\SubSonic 2.0.3\SubCommander\",
$configfile = "",
[switch]$excludetables,
[switch]$excludeods,
[switch]$excludeviews) {
$sonic = "sonic.exe"
if ($configfile.length -gt 0)
{
if (Test-Path $configfile)
{
$generateconfig = "generate /config '$configfile'"
# Due to some difficulties with Invoke-Expression we'll change directories
# to excecute the command and then reset the directory when we are through.
$savepath = $pwd
Set-Location $SonicPath
if ($excludetables -eq $FALSE) {Invoke-Expression(".\$sonic $generateconfig")}
Set-Location $savepath
}
else
{
"Please provide a valid configuration file name when using the configfile parameter."
exit
}
}
else
{
# Use a database helper function that allows us to get a password in a secure manner.
# If the username is not an empty string then the function just returns the original username/password
$cred = get-sqluser $username $password
# Create some standard argument strings for SubCommander
$generatetables= "generatetables /override /out '$BuildPath' /lang $Lang"
$generateods= "generateODS /override /out '$BuildPath' /lang $Lang"
$generateviews = "generateviews /override /out '$BuildPath' /lang $Lang /viewStartsWith View"
"Removing and recreating the target directory: $BuildPath ..."
del $BuildPath -recurse -force
new-item $BuildPath -itemtype Directory -force | Out-Null
$username = $cred.username
$password = $cred.password
# Building our provider string. Everything is parameterized.
$Provider = "/server $server /db $db /userid $userName /password $password /generatedNamespace $namespace"
"Generate using connection string: "
"`tserver = $server"
"`tdb = $db"
"`tuserid = $userName"
"`tpassword = $password"
"`tgeneratedNamespace = $namespace"
"`n"
# Due to some difficulties with Invoke-Expression we'll change directories
# to excecute the command and then reset the directory when we are through.
$savepath = $pwd
Set-Location $SonicPath
if ($excludetables -eq $FALSE) {Invoke-Expression(".\$sonic $generatetables $provider")}
if ($excludeods -eq $FALSE) {Invoke-Expression( ".\$sonic $generateods $provider" )}
if ($excludeviews -eq $FALSE) {Invoke-Expression( ".\$sonic $generateviews $provider" )}
Set-Location $savepath
}
}
I have created a whole library of database related functions like Get-SqlUser, which I was able to re-use in the New-Dal function. To really see why PowerShell is such a powerful solution, lets look at a quick video where we see the new function in action.
- Posted by Admin on December 16, 2007
Several months ago I stumbled upon PowerGadgets and have been finding more and more uses for it ever since. I was initially intrigued by the ability to run powershell scripts but didn't have any immediate needs that required that much power. One of the strengths of PowerGadgets is the ability to run database queries and then to present the data using very slick graphs, guages and maps. On Vista, these visualizations are displayed using the Windows Sidebar, however you can also use floating windows which allows PowerGadgets to be equally at home on Windows XP.
My sidebar is now littered with numerous gadgets that I use to show key application metrics, from DotNetNuke Marketplace sales figures to helpdesk work queues. I have found that picking a few key queries allows me to monitor multiple web applications without requiring me to constantly login to a bunch of different apps. The nice thing is that as your needs change, you can quickly add new gadgets and remove older gadgets which don't have as much meaning. Since it takes less than 5 minutes to configure most gadgets, you feel free to create them as you need them, and get rid of them when they are no longer needed.
Recently, I found a need that could not be solved with a simple database query. The DotNetNuke website was experiencing serious performance issues. Team members were IM'ing me a couple of times a day to tell me that the website wasn't responding again. There are hundreds of applications available to perform website monitoring, but I was really interested in finding a lightweight solution that I could get running quickly and modify as I needed to. Otto Helweg from Microsoft had a quick and dirty PowerShell script for doing web site monitoring that provided a good starting point. So I fired up PowerShell Plus and modified his script to query the DotNetNuke website and report how long it took to return the results. His script was still too heavy and did not provide the quick visual impact that a tool like PowerGadget makes possible. With some heavy trimming I was able to get to the essence of the script. Since I was also interested in seeing the site performance as a graph, I added some additional code to persist the timing data to a simple text file which is then used to drive the graph. You can see the script below. Notice that the persistence code is actually the most complicated part of the script and that monitoring the site is actually a very trivial part of the script.
#Standard Settings$source = "http://www.dotnetnuke.com/default.aspx"$timingsfile = "D:\Users\Joe\Documents\PowerShell Utility Scripts\PsObject\Web\monitor.txt"$retaincount = 90#Check time to download page$wc = New-Object System.Net.WebClient$curtime = (measure-command { $content = $wc.DownloadString($source) }).TotalSeconds#Update array values$timings = Get-Content $timingsfile$webtimes = New-Object System.Collections.ArrayListswitch (($timings | measure-object).Count ) { $null {"We don't have to do anything." | Out-Null } #single line comment hack #Get-Content returns an array of string unless it is a single line #so when one line is present the variable is a single string 1 {[void] $webtimes.add($timings)} #when multiple lines are present the variable is an array of strings default {[void] $webtimes.AddRange($timings)} }[void] $webtimes.add($curtime)if ($webtimes.count -gt $retaincount){ $webtimes.RemoveAt(0) }$webtimes | Out-File $timingsfile#Output array of values$webtimes
csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }
One of the great features of PowerGadgets is the ability to schedule a script or a query to run on a set schedule. With one setting I can have my script run every minute. With a script in hand, I created the following gadget in less than 5 minutes, and most of that time was spent just configuring the graph features. Now I know at a glance if our site is having serious problems. As long as I don't have too many spikes, or (heaven forbid) a maxed out graph, then everything is just fine. If I start to see a bunch of spikes or I see the chart stay above 30 second response times, then I know it is time for me to act.
Future revisions to this script will include additional logic to send SMS messages to predefined phones whenever my site hits certain performance criteria (like 3 consecutive timeouts or 10 timeouts in a 90 minute period). This will allow me to ensure that we can be responsive to site outages whether we are sitting in front of the computer or not.
I have asked the PowerGadget team for a couple of enhancements that I think would really enhance the usability of PowerGadgets:
1. Allow me to define parameters for scripts in the PowerGadgets Creator. At run-time a gadget user could open a settings page that allowed them to edit these values. This would not require the user to know any PowerShell. So in my example above, I would like to package this gadget (which PowerGadget already does) and allow my gadget users to customize the site they are monitoring, the file where they are storing results, or the number of results to retain without needing to edit the script.
2. Allow gadgets to have an “alarm” function – if a gauge reaches a certain level, or data on a chart meets certain criteria, then take some action. This feature should include both simple alarms and scripted alarms. A simple alarm might include predefined triggers like simple value comparisons, and predefined actions like sending email, or flashing the gadget window. A scripted alarm would allow the developer to define a PowerShell script which evaluates the gadget data/context and returns a boolean. The developer would also define a PowerShell script to be executed if an alarm event is triggered.
I urge you, if you haven't checked it out already, to give PowerGadgets a try. You just might make your job of monitoring servers and applications much easier.
UPDATE: Updated the script to resolve a bug when your timings file is empty or only contains one line.
- Posted by Admin on December 7, 2007
While I was in the Netherlands for OpenForce Europe, I had the misfortune to lose my original Zune. I thought the Zune software was ok and the player was so-so. I really liked the promise of having integrated wi-fi, but found the initial implementation to be a bit lacking. I was forced to go back to using my old iPod Mini.
Now for all of you Apple Fanboys, I think the new iPod touch is awesome (if a little overpriced), but I am not a fan of Apple software at all. I have way to many crashes with the Apple updater service. Since I was back to using my iPod Mini, I found a new appreciation for some of the things I liked about the Zune. For all of the useability press that Apple gets, I just don't get the controls on the iPod. It displays a vertical list (menu items or songs) and then requires me to make a circular motion to move up and down. That is not intuitive at all. This is one of those little things that made using the Zune much easier for me. I wasn't forced to remember - do I move clockwise to move down in the list, or counter clockwise? How do I change the volume? With the Zune it was press up to increase the volume, press down to decrease. Press left to move left. Press right to move right. My hand motions matched the visual cues I was being provided.
Well, after a lot of waiting and searching, I was finally able to find one of the new Zune 80's last week. I like the Zune 2.0 software better than the 1.0 software. The player is also a big improvement over the original. It no longer seems like I am carrying around a brick. It is kinda like the difference between cellphones that were offered in 1997 and those offered in 2007. The ones in '97 seem so large by comparison. Anyone, the new player has a larger hard-drive but is much smaller than the original 30GB version.
Not only did Microsoft make a lot of improvements to the hardware, but they also completely rewrote the firmware. The new firmware is much more intuitive and has a cleaner design. When paired with the Client software and the Zune Social site, I find that the Zune presents a much more integrated experience than it did before. I think the Social site adds a unique twist to the Zune. This is a great opportunity to see what others are listening to and opens me up to new possibilities. If nothing else, it gives me something else to discuss with my network of friends. The fact that it is tied in with my Xbox Live/Windows Live account allows me to start bringing my various social networks together and finding new commonalities with old friends.
Well, being the DotNetNuke geek that I am, I knew I had to create a DNN themed background for my zune. I have posted the image on my flicker account (just click on the image below). The white letters with the red background is a great contrast.
- Posted by Admin on October 29, 2007
I have seen a few posts recently about other conferences (Adobe Max and Community Server Developer Conference) that made me think hard about how we have positioned the OpenForce conferences this year. I remember in past years that events like JavaOne developed a reputation for being nothing more than giant sales and marketing event put on by Sun. This is a trap that I hope we never fall into with the OpenForce conference. Our goal from the very beginning has been to create an event where the community could come together and share our experiences and learn from other experts in the community.
While I know that the community is interested in where we are going with the DotNetNuke and how DotNetNuke Corp plays into the big picture, I also know that few people want to spend their hard-earned cash just so they can sit through a marketing pitch. Our challenge this year and beyond is to make sure we keep the focus where it belongs - on you - the community. We worked very hard this year to attract some of the superstars in the community to come and speak at the conference. Our goal was not only to get great speakers (which I think we have done), but also to make sure that we covered topics that would be relevant to our entire community - not just developers and not just people from North America.
If we ever lose sight of where our focus should be, I hope that someone from the community reminds us of why we created this conference in the first place. This doesn't mean that we won't tell the community about some of the features we have planned or about some of the community support services that DotNetNuke Corp. offers, but we do not want that to become the focus of the event.
Our OpenForce events would not have been possible without the support and backing of both SDN and DevConnections. They have allowed us to focus on getting the content right, while they did the heavy lifting on the logistics side of the house. Even though a lot of effort has gone into preparing for both of these conferences, we know that we can do better. Next year we look forward to streamlining our processes to identify speakers earlier, to expand the number of sessions and tracks that we offer, and to attract even more attendees and sponsors.
If you are attending OpenForce '07 next week, feel free to stop by the DotNetNuke Corp booth (booth #736), we would love to meet you and chat. Yes, we may actually show you some of what we are planning for DotNetNuke 5.0, but we know you won't mind.
- Posted by Admin on October 17, 2007
In my last post Getting a Username/Password in PowerShell (cross posted to PowerShellCommunity.org), I was asked why not just use the Add-Member cmdlet. Having been doing software development for my entire adult life, this is not the first time this question has come up. Ok. Maybe not those exact words, but something very similar - why use code X when code Y does the same thing. Where I come from there is really only one response to this - look at both code alternatives and determine which one is the most efficient at doing the job without also becoming a maintenance problem. So lets take a peek under the hood a bit so we can see why I chose PSObject.Members.Add over using the Add-Member cmdlet.
Scripting is code - except on the command line
When working in PowerShell I try to keep a clear understanding of my usage scenario. If I am writing something intended to be typed on the command line then I tend to favor a more script oriented approach where I make heavy use of piping one command into another and where cmdlets provide all of the heavy lifting. However, when I sit down to write a function, I am coding and I tend to favor a much more expanded and explicit coding style using variables and objects. This makes it easier to maintain the code and to understand what exactly I am trying to accomplish.
Know what is happening under the cover
Once I know what coding style I will be using then I need to evaluate the effectiveness and efficiency of the coding alternatives. Often this means you will need to understand what is happening inside the framework. One of the reasons that I am excited about the announcement that .Net is going to provide Source code is that I will finally be able to look at the source code with full commenting. Until that happens though, I still have Reflector and I use it very heavily.
In this case the question is: Why use Members.Add instead of using Add-Member? Lets look at what is going on in Add-Member and you'll see why.
Microsoft.PowerShell.Commands.AddMemberCommand.ProcessRecord() is the relevant method that gets executed when we run the Add-Member cmdlet. There is some basic error checking to make sure that certain cmdlet parameters were set - like membertype.
Next we have a giant case statement:
Select Case Me.memberType
Case PSMemberTypes.AliasProperty
member = Me.GetAliasProperty
Case PSMemberTypes.CodeProperty
member = Me.GetCodeProperty
Case PSMemberTypes.NoteProperty
member = Me.GetNoteProperty
Case PSMemberTypes.ScriptProperty
member = Me.GetScriptProperty
Case PSMemberTypes.ScriptMethod
member = Me.GetScriptMethod
Case PSMemberTypes.MemberSet
member = Me.GetMemberSet
Case PSMemberTypes.PropertySet
member = Me.GetPropertySet
Case PSMemberTypes.CodeMethod
member = Me.GetCodeMethod
Case Else
'Deal with error...
End Select
This case statement doesn't provide any real value to our function since I already know what type of members I wish to add, I don't need the cmdlet to make a conversion from my "string" to a root class type. Even once the membertype is determined, the cmdlet calls another function (GetNoteProperty in our case) which we see below:
Private Function GetNoteProperty() As PSMemberInfo
Me.EnsureValue1HasBeenSpecified
Me.EnsureValue2HasNotBeenSpecified
Return New PSNoteProperty(Me.memberName, Me.value1)
End Function
So in essence, this big case statement is doing exactly the same thing as my code, except with a lot more overhead. It is creating a new PSNoteProperty. Now lets look at the next part of the ProcessRecord method.
Dim info2 As PSMemberInfo = Me.inputObject.Members.Item(member.Name)
If (Not info2 Is Nothing) Then
If Not Me.force Then
MyBase.WriteError("...")
Else
If info2.IsInstance Then
Me.inputObject.Members.Remove(member.Name)
goto Label_0201
End If
MyBase.WriteError("...")
End If
Return
End If
Me.inputObject.Members.Add(member)
So we see that beyond a bunch of extra error handling to deal with members that already exist, this code just calls Members.Add().
At this point I think it is safe to say that my original code and the Add-Member cmdlet are performing exactly the same function. However, with the cmdlet there is a performance penalty to be paid for parsing all of the strings passed to the cmdlet and converting them to types. Determining how to act based on some of the parameters (like -force). Also, I think that my code is just as readable as using the cmdlet. Ultimately though, Add-Member is just sugar coating for adding a PSMemberInfo object to a PSObject.Members collection.
So, the next time you have a question about whether to use a cmdlet or whether to use "code", pull out reflector and see what is really happening under the hood.
- Posted by Admin on October 16, 2007
As part of getting ready for my PowerShell session at OpenForce '07, I am creating a set of helper functions for working with SMO to manipulate and query the database server. A common need when working with the database is to pass the username and password to various SMO methods. When I first started coding my examples, I just passed a username and password as parameters into my functions. This works, but does not exactly look professional when you are sitting in a presentation and typing out passwords in plaintext.
I decided that it would be better to use Get-Credential in this case since it would provide a professional dialog and keep the password hidden throughout the process. Since I wanted to support both scenarios, I came up with the below function.
function global:get-sqluser($username="", $password="") {
# We are creating an object to which we'll add custom properties
$user = New-Object Management.Automation.PSObject
if ($username -eq "") {
# No username was specified, so we should use Get-Credential to prompt for a user
# We also define a default username in order to suppress console output
# The results are added as synthetic properties to the PSObject we created above
$cred = Get-Credential "SqlUser"
$user.psobject.members.add( (New-Object System.Management.Automation.PsNoteProperty UserName, $cred.username.split("\")[1]) )
$user.psobject.members.add( (New-Object System.Management.Automation.PsNoteProperty Password, $Cred.Password) )
} Else {
# In this case we can just create synthetic properties using the values passed to the function
$user.psobject.members.add( (New-Object System.Management.Automation.PsNoteProperty UserName, $username) )
$user.psobject.members.add( (New-Object System.Management.Automation.PsNoteProperty Password, $password) )
}
# Return our synthetic object
$user
}
It is not perfect as the two cases return the password as either a cleartext string or a securestring. Also, I don't like the hack with the Get-Credential since I don't really need a domain qualified name (notice the ugly split("\")[1] that is needed to get just the username without a domain qualifier). My next version will resolve both of these issues, but for now this will have to suffice.
- Posted by Admin on October 14, 2007
For the past couple of months I have been playing with PowerShell and it has been a real pleasure to dig-in and get my hands dirty in a command-line interface again. Not since my early days with the Amiga and ARexx have I enjoyed learning about a new CLI and an associated scripting language. The PowerShell team has done a great job of bringing windows scripting and the CLI into the 21st century. Not only has Microsoft been putting in a lot of effort into PowerShell, but you are also seeing an explosion of third-parties who have also jumped onboard to push the new language and hosting environment. Companies like Sapien, Quest, /n Software, and ShellTools are creating great tools and sponsoring community sites like PowerShellCommunity.org.
With all of this excitement and passion in the PowerShell community, how could I not look to see how I could use PowerShell with DotNetNuke. Thus was born my session idea: PowerShell for DotNetNuke which I will be presenting in Las Vegas at OpenForce '07. During my session I will be showing how you can use PowerShell to enhance managing DotNetNuke, both for installing new sites and for sites that are already up and running.
One of the early ideas I had was that I might even be able to create a DotNetNuke module that would let a user execute PowerShell commands and scripts on the server. Since DotNetNuke allows you to lock down access to any module it is fairly secure. The initial code for this module is based off earlier examples by Scott Hanselman and Dominick Baier. Here is a sample video of my work so far.
I still have some enhancements that I will be making before the conference, but you can download the latest code here.