By Joe Brinkman on
8/27/2008 12:42 AM
 While catching up on blogs this morning I ran across a little PowerShell gem on Walking Dependencies in Powershell. Chris outlines a problem that has popped up a few times in DotNetNuke. Usually it revolves around CountryListBox or DotNetNuke.WebUtility. Finding the offending assembly is always trial and error. Chris’s solution should help resolve that issue. I found a few minor bugs in Chris’s script which I have fixed. The reflection call is a static method and is missing a “]::” and the Convert-Path is unneeded if you call ReflectionOnlyLoadFrom with $_.FullName (this will become important in a minute). [more] ...
|
By Joe Brinkman on
8/19/2008 12:13 AM
 Over the last 5 years I have literally installed DotNetNuke hundreds of times on my local development machines. During this time installation has gotten easier, but it still takes a few minutes and is still subject to mistakes being made. Also, because there are several steps involved, I often take shortcuts. This is ok when I am just throwing up development instances, but it is counterproductive when I am trying to do actual testing of a beta or release candidate.
Last fall I started building a series of PowerShell scripts for simplifying the process. Although there are installers available for DotNetNuke, they...
|
By Joe Brinkman on
1/1/2008 5:03 PM
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...
|
By Joe Brinkman on
12/16/2007 11:44 AM
 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. ...
|
By Joe Brinkman on
10/17/2007 6:36 AM
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...
|
By Joe Brinkman on
10/16/2007 2:06 PM
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...
|
By Joe Brinkman on
10/14/2007 12:26 PM
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...
|
By Joe Brinkman on
7/7/2007 7:36 PM
 Having worked with DotNetNuke for more than 4 years now, I have performed literally hundreds of installations. While the installation process has gotten easier over the years as we have beefed up the installation routines, it is still not automatic. Even though I can install DNN in under a couple minutes, I often cut corners. I usually just give the Asp.Net process account full control of the web application folder and use an sa account in the DB. Neither of these are great practices, but setting up the correct permissions is a little more tedious...
|
By Joe Brinkman on
6/28/2007 4:04 PM
 Recently, while working on a new module installer I needed to be able to roll back my test environment as I went through the various iterations. This was not a trivial installation and therefore I knew that I would likely have to take several stabs at this before I got it right.
Normally, I would turn to either Virtual PC or VMWare in this case. Unfortunately Vista and Virtual PC were not cooperating today and it was taking forever just to do simple file copies between the VPC and host machine. Installing the module which clocked in at just over 4Mb took forever. All of my time savings was being eaten up by a finicky Vista install. Since I re-paved my machine a few months back I did not currently have a VMWare installation running on this machine so that was not really an option....
|
|
Tagcloud
Categories
Archives
|
|