I’m working with PowerShell, and digging it. I decided that I wanted to create a new script (blog post later, if I get it to work) and I wanted to try out different scripting tools to build it. I started with PrimalScript from Sapien. It’s slick. It’s powerful. It has very nice code completion, a great GUI, integration with source control out of the box.
I started scripting and everything was fine. Then, I needed to run invoke-Sqlcmd so I decided to change the profile on the shell so it would load the SQL Server cmdlets automagically. I started getting the error:
Get-ItemProperty : Cannot find path ‘HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.SqlServer.Management.PowerShell.sqlps’ because it does not exist
Hmmm… weird. I’m pretty sure I used the same command on my workstation as on my laptop. So I checked it out. Sure enough, same command. So I navigated through the path to ensure everything was in place. I opened up a seperate shell on the laptop and on the workstation. They both showed the path just fine. I couldn’t figure it out. So I opened up the registry and browsed through directly. Yep, the path was there. I opened a shell directly from PrimalScript. I got the error again. Then I tried to navigate to my path. No love. Why?
Then I noticed, in the path in the window that opened from PrimalScript, two little numbers, 32. It’s running the 32 bit shell. Funny enough, the install of SQL Server is 64 bit. It’s visible to the 64 bit shell, the one I ran, but it’s not there to the 32 bit shell. Now I get to track down how to configure SQL Server cmdlets to be visible to both the 32 and the 64 bit shell. Fun.
Idera’s PowerShell Plus has a 64-bit version. I’m just trying to get Quest’s PowerGUI installed, but it looks like it’s 32-bit. This is something to keep an eye out for when choosing and configuring your editor.
[…] This post was mentioned on Twitter by sqlbelle. sqlbelle said: RT @GFritchey: One of these things is not like the other: I’m working with #PowerShell, and digging it. I decided … http://bit.ly/cPxEAs […]
Yeah I grabbed PrimalScript and noticed that too. It’s got a couple other frustrating things, like PrimalSQL is ALMOST nice, but it keeps trying to pop up tab completion stuff for the user generated tables when I’m trying to look at DMVs, and none of the source integration works with the source control I use at my company (neither SVN NOR git, what the hell guys). It has alright PHP, bash, and AWK support, but it’s not like it does much more than syntax highlighting for what I’m doing (PHP only gets used for Cacti and Nagios scripts).
The thing I like about PrimalSQL is that I can basically use it like a really fast SQLCMD without having to connect via SSMS or having to just type SQL in a command prompt, although really it looks like the new version of SQLPSX will handle that as well.
I’m not sure this replaces Vim as my actual script editor yet, but I’m still doing the evaluation.
I was pretty concentrated on the PowerShell aspects of it. I haven’t tried the SQL yet. I may have to give that a swing after I find out if they’re going to support 64-bit or not.
The SQL stuff would be usable if there were a way to turn off the Intellisense nonsense. It’s just way too aggressive and it winds up popping up in places where it really shouldn’t. Maybe this is something they’ll get fixed eventually. The SQL product is something I’d probably take a look at next year.
PrimalScript seems to lack PowerShell’s remoting, which is a bit of a downer, especially because I have a few deploy scripts that actually use that feature. I’d figure that’s something these guys’ll get cracking on quick though, seeing as it seems to mostly be an admin tool.
I wonder if Microsoft’ll roll solid PowerShell support into Visual Studio 2010 :p
Weird to when I have Window 7 x64 and I install PowerGUI. When I look at the Program Menu it shows this tree:
PowerGUI
PowerGUI Script Editor
PowerGUI
x86 (folder)
PowerGUI Script Editor x86
PowerGUI x86
If you follow the path of where they start from, they are all in Program Fiels (x86)??? What is with that, it all most gives you the missconception that it is running as 64bit.
I would love to use PrimalScript, but I don’t have the finances at the moment to use them. However first learning (as I am) I believe it would be better to not use “tools”, it will force me to learn it more.
I think you’ve got a good argument for skipping tools as a learning process, but you can also say that having the tools just makes things a little easier to find, which also helps the learning process. Even with the tools you have to know what you’re doing. They don’t program for you.