2011-03-30

No snap-ins have been registered for Windows PowerShell version 2

I was getting this message in SPPower (http://sppower.codeplex.com/), an application I am building to run powershell commands from WPF.

“No snap-ins have been registered for Windows PowerShell version 2.”

The code was basically this:

using (PowerShell ps = PowerShell.Create()) {
PSSnapInException ex = null
ps.Runspace.RunspaceConfiguration.AddPSSnapIn("Microsoft.SharePoint.PowerShell", out ex);

Doing a search returned this helpful link:

http://blogs.msdn.com/b/pareshj/archive/2010/07/30/error-msg-no-snap-ins-have-been-registered-for-windows-powershell-version-2.aspx

This suggested it was something to do with the different OS architectures.

Then it hit me, i was developing on Vista x86, but needed it to run on Windows 2008 x64. So I went to the visual studio project, and found it was targeted to x86 platform. All i needed to do was change it to "Any CPU", so it works on both the development and target environments

2011-03-05

WD My Passport Essential SE 1TB

Well, i got a dick smith gift card for christmas, so i needed to use it up, but there is not really much at DSE that i would buy. I decided to get an external hdd for backing up stuff on my laptop while traveling.

Though i have had a little trouble with WD Green drives lately in my NAS, i decided to stick with WD.

I wanted the portable small drive, with as much storage as i could get, 1TB, and preferably with a USB 3 interface. The My Passport Essential SE 1TB http://www.wdc.com/en/products/products.aspx?id=430 gave me all of those. I would have liked to have a 7200 rpm drive, but no it didn't have one of those. I suppose it doesn't really matter as i have no usb 3 ports ... yet.

I had a look at some reviews, and people seemed to think there was a lot of bloat ware. Not a good sign. And there was a virtual cd that could not be removed. Some more searching, and i found a tool to nuke the bloat http://www.dedoimedo.com/computers/passport-vcd.html, so i was pretty much set to buy.

When i got to the shop they had 500GB Essentials and 1TB Essential SEs. I couldn't remember if the "SE" was good or bad... I took a risk and bought the SE. Luckily it turns out that the "SE" probably means second edition, and it is the evolution of the product http://www.wdc.com/en/products/external/portable/

I opened the box, and to my dismay, i saw that the cable had some port on it i had never seen. Oh no, i thought, i have got suckered into getting a non-standard proprietary piece of hardware. Turns out though, that the port is really the micro usb 3.0 standard. http://www.wdc.com/en/products/resources/drivecompatibility/

Finally when i plugged the drive in, the bloat was there, but without the virtual cd drive. A quick format, and i had a perfect drive.