Wednesday, May 21, 2014

Powershell IDE’s

There are a number of free Powershell Development environments out there. So far, my favorite is Dell’s (formerly Quest Software’s) PowerGui. My current IDE of choice is Idera’s Powershell Plus. There are a few things I still use Microsoft’s native Powershell ISE for, but it doesn’t have all the features I am accustomed to from the other IDE’s. A few of my observations are summarized below, but since they are all free tools, I am appreciative of the value they provide.

Windows Powershell ISE

I like that it has the screen wipe button to clear the console, but since I work more in PowerGUI and Powershell Plus, I am now accustomed to putting a CLS command at the top of my scripts to clear the screen between executions.

There is an x86 version and x64 version which makes working with older 32bit dll’s like the SAP Business Objects 3.1 .Net API’s easy.

In the versions I used there didn’t appear to be much if at all in terms of Intellisense (code completion options). Because I switch between editors for VB.Net, C#, Powershell, and SQL Server, Intellisense is a desirable feature to improve productivity.

Powershell Plus

It took me a while to find all the options to set up the environment the way I like it (more like the default PowerGUI interface). It has more bells and whistles than PowerGUI, but most of the time I don’t really need all that. Mainly I just want the code window, console output window, and the variables list.

I do like the debugging functionality which automatically steps one line at a time through the code pausing briefly so you can see what line it is currently executing.

I don’t like how the comment/uncomment works. It uses a paragraph style comment block vs. commenting individual lines which means I can’t selectively uncomment only a few lines in the bulk paragraph block. Also I can’t uncomment the whole block unless I select exactly the correct selection.

There are more options for Executing the scripts, but that seems to take more clicks to Execute in the manner I want to use while testing.

I am still relatively new to Powershell Plus so my productivity will improve as I become more familiar with its IDE design.


This is my favorite, but my issue with it is it doesn’t appear they are actively developing it since Dell acquired it from Quest Software. It hasn’t had an update in a few months and the version I have installed won’t uninstall and I can’t install the newest release without error. The Intellisense is pretty good.

I like how the comment/uncomment functionality works. It works like Visual Studio and SQL Server where it will comment or uncomment exactly which lines are highlighted, even if only a part of the line is highlighted.

When typing a file path, the GUI makes it easy to click on the path and finish completing the path by navigating the folder structure with a Windows Explorer Browse like functionality.

I like the options for Execute All and Execute selection. There are buttons for them right on the top menu as well as the right click menu.


Dell PowerGUI

Idera Powershell Plus

Windows Powershell ISE

Wednesday, April 16, 2014

SQL Server Daily Health Check page and Powershell script update

I recently created a new page for my SQL Server Daily Health Check Powershell script download and documentation. I updated the script to version v0.8.2 which refactored the original script into a function to eliminate repeating code and make it easier to customize with additional checks. I will add additional documentation and instructions as I get time.

Wednesday, February 12, 2014

Stop Main Page from Scrolling on iPad within Scrolling ModalPopup

Using ASP.Net ModalPopupExtenders can improve the user experience, but sometimes introduce some annoying side effects on a Mobile device. On a Mobile device like an iPad, if you have a ModalPopup that has more content than fits the screen, it can require having a scrollbar within the popup. If the main page is also too long for the screen, the main page can have a scroll bar also. The user experience degrades when on an iPad, the user is scrolling down the popup content and they reach the bottom of the popup, continued swiping up to scroll down will then start scrolling the main page down. If the user wants to scroll back up within the popup, they must repeatedly swipe down to first scroll the main page up until the top of the main page is reached at which point the popup content will start scrolling up.

There are a number of search results that “remove the scrollbar” from the main page while the modal popup is open by setting the html and body CSS tags to overflow:hidden, but many mobile devices don’t respect overflow:hidden alone. I found it was also necessary to set position:fixed also. When the popup is closed reset the position to static or inherit and set overflow to auto. I used jQuery to change the CSS tags to hide and show the main page scroll bars.

In my example, I had a div tag with id=”wrapper” in the Master Page surrounding the main page content. I had a ModalPopup window in the WebForm containing a Label (blank text) with a CssClass=”promoVisible” and an OK button with the CssClass=”popupOk”. On the WebForm with the Modal Popup, I used the following jQuery that does all the magic.

$(document).ready(function () {

//had to set position:fixed to work on iPad and other mobile    

   $('.popupOk').click( function(){

      $('#wrapper').css('overflow', 'auto');

      $('#wrapper').css('position', 'inherit');

      //  alert("ok clicked");


   // if the popup is visible, fix the overflow so the

   // background doesn't scroll, only the popup window


      $('#wrapper').css('overflow', 'hidden');

      $('#wrapper').css('position', 'fixed');

   } else{

      $('#wrapper').css('overflow', 'auto');

      $('#wrapper').css('position', 'inherit');