Articles from November 2008

VS Team Edition for IT Admins

By Michael Flanakin @ 2:43 PM :: 2224 Views :: .NET, Tools/Utilities, PowerShell :: Digg it!

Yes, I said "admins," but, unfortunately, this isn't an announcement. I'm simply thinking of a version of Visual Studio built for, well, admins. Specifically, I'm envisioning an environment to build and debug PowerShell scripts and cmdlets. Of course, this is only a hop, skip, and a jump away from PowerShell as an official .NET language. Imagine that, PoSh.NET... or, would someone force it to be P#? Either way, I like the idea. As an official language, that also opens it up to compiled scripts, which would be great for those servers without PowerShell installed. Of course, it's just a matter of time before PowerShell is default and the legacy DOS shell is eventually phased out. As a matter of fact, that's the plan for Windows 7 and Server 2008 R2. I'm not sure about Server Core, tho, since there's still the dependency on .NET.

PowerShell Tip: Creating GUIDs and Code Generation

By Michael Flanakin @ 11:30 AM :: 5812 Views :: Development, PowerShell :: Digg it!


I should start off by saying this isn't really about hard-core code generation. It's more about simplifying some of the more repetitive tasks we tend to do during development. In this instance, I needed to get 7 GUIDs to use in some test code. Sure, I could've use the Create GUID tool in Visual Studio, but what fun is that? Besides, I hate manual tasks and this tool would have forced me down a ~24 step process. No thanks. I'll stick to the 3 steps PowerShell can give me.

First thing's first, how do we create a GUID in PowerShell? I'm going to fall back to .NET for this one.


If you run this, you'll get a blank line. What's up with that!? Admittedly, I'm not 100% sure why this is happening, but I have a pretty good guess. GUIDs are surrounded by curly-braces ({}), which are interpreted by PowerShell to be a script block. Putting 2 and 2 together, I'm assuming PowerShell thinks this is a script to run. Easy fix.


That's it. The only other thing I had to do was add in my other formatting to create the GUID in code and slap that in a loop.

foreach ($i in 1..7) { 'new Guid("{0}")' -f [Guid]::NewGuid() }

You'll notice I opted to use the PowerShell shortcut syntax for string formatting. If you missed it, I talked about it as well as the static-method-calling syntax last week.

This tiny exercise reminded me of a pretty advanced Excel spreadsheet I created years ago because I was sick of typing the same bit of code over and over again. Since then, other tools, like GhostDoc and Resharper, have augmented my developer experience, enabling a much higher level of productivity than I had back then. Nonetheless, there is still room for improvement. This makes me wonder how much PowerShell could do for me with respect to code generation.

New Feed for MSDN Downloads

By Michael Flanakin @ 8:58 AM :: 2409 Views :: Tools/Utilities, MSDN Subscriptions :: Digg it!


In what must be a huge coincidence, the MSDN subscriptions team Syndicated feed just informed us about an updated feed for MSDN downloads Syndicated feed (link is to en-US feed). While I'd like to think this was due to the my prodding, I think it's pretty safe to say it's not. Besides, this is just a revamped version of the old feed, which just covers the subscriber downloads. The team's post sounds like it's a very good thing. I'm not sure if anyone else followed the old feed, but the quality bar wasn't very high. I consistently noticed that new downloads weren't announced. This should fix that. Unfortunately, it won't change the fact that you'll get a multitude of announcements for products released in different formats (i.e. ISO, EXE, DVD). At least you can get it for your desired language, tho.

PowerShell Tip: Scoping Script Execution

By Michael Flanakin @ 8:43 AM :: 1833 Views :: Digg it!


PowerShell gives us three different ways to execute scripts.

  • func()
  • &func()
  • . func()

I learned this one a while ago and have to say it was pretty annoying... at least before I knew what was happening. Most people expect the first type of execution, because it's used in any scripting or programming type of environment. The other two seemed odd to me, tho, and I would never have known about it if someone didn't tell me why I was having issues with a script. Oh, and there doesn't seem to be anything in the built-in help about it.

The difference between these three is all about scope. Let's start with an example script.

$x = "123";
function setX($value) { $x = $value; "x = $x"; }

What do you think will happen? Will $x be "123" or "xyz"? The answer is "123". Why? Because, by default, script blocks are entirely self-contained.

Now, let's use the "&" to see what happens -- remember that $x is still "123".


What now? Same thing. It's still "123". The main purpose of the "&" prefix is to allow you to execute something. This could be a function, like we did here, or it could be a file name. This allows you to build a string or get a file name and then use something like &$docxfile to open the file in the default program.

Finally, we have the "." prefix, which I'm sure you can guess what will happen. The only thing you have to remember is to put a space between the "." and function name. Again, $x is still "123".

. setX("xyz");

Finally! Our variable has changed.

For a bit of background, I ran into this when trying to re-run my profile script. I was aware of the "&" execution prefix and tried &$profile to re-run my profile. It worked, but the new functions I added to it weren't available to me. I went thru several work-arounds to make them available before manning-up and asking what the deal was. Actually, I did try using the "." prefix, but I tried .$profile, which didn't work. This was because I didn't put a space between the "." and the function (or file name, in my case).

The Future of Windows Live FolderShare

By Michael Flanakin @ 4:55 AM :: 1813 Views :: Tools/Utilities :: Digg it!

Windows Live FolderShare + Mesh = Sync

Windows Live FolderShare used to be the most important tool in my arsenal. That changed when Live Mesh was in beta. As soon as I was added to the pre-beta program, FolderShare has been but a mere memory. That decision may have been a questionable one, however. There has been talk about FolderShare being rebranded as Live Sync in the past and the FolderShare team just confirmed it. The bigger picture, however, is that what we now see as "Live Mesh" is only a sample application on top of the Windows Azure platform. The key here is "sample application." I always knew the sync and remote desktop capabilities within Mesh were intended to be a proof of what's possible, but it was never posed as an app that would eventually be dropped. Granted, I'm an early-adopter and am used to a few cuts and bruises, but it would have been nice to see where this was going. Maybe that doesn't matter, tho, because I don't think I'd change anything. Live Mesh is significantly better than FolderShare and I imagine Live Sync won't be much better in its initial incarnation. Soon, however, we'll start seeing Live Sync take over more and more of what Live Mesh has to offer. How long will it take? Only time will tell. I'd like to say 6 months, but the FolderShare team is notoriously slow. The only thing we really have to cling to is that the FolderShare... err, Sync team should be able to take a lot of what Mesh has today. The impression I got was that this was an evolutionary improvement, tho. We'll see what happens next month. Either way, be ready to switch from Mesh to Sync. I'm hoping the team manages to automate that upgrade/migration so it will be relatively transparent. The only problem I see today is the format FolderShare uses during the sync process; however, it sounds like Sync will change all that. Like I said, tho, we'll see...

IE 8 Release Timeline

By Michael Flanakin @ 1:27 PM :: 2144 Views :: Technology, Microsoft :: Digg it!

Internet Explorer

Yesterday, the IE team posted a comment about what's next for IE8. I didn't get much out of this except for the fact that the next set of bits will be available in early 2009 and will include all the major enhancements, which includes feature adds and performance tweaks -- and let's hope they're significant because IE8b2 is slower than IE7 for me. It sounds like this next release will be a release candidate (RC), but that statement was very non-commital, so it may end up being beta 3. Either way, it sounds like this next one will be the last pre-release before the final version. There's still no word on when that will be, but with speculation that Windows 7 will be out in late 2009, it would make a lot of sense to see it just a little earlier than that release, so it's bundled with the new OS.

I won't confirm or deny anything about what I've heard about the Windows 7 release, but IE8 has most definitely slipped past internal deadlines. I know the team has thought about IE9, but as we drive past one milestone after another for IE8, there's no telling when that'll happen -- not that I don't have a guess I can't say I'm surprised, tho. The timelines I saw for IE8 and 9 were very ambitious; especially, when you consider how long it took IE7 to come to market. Of course, that comes more from neglect than anything. I should say that those timelines were very rough and only touched on some high level things to look forward to. What's surprised me with IE8 so far is that it's missing one of the things I could swear I heard about over a year ago. Maybe it was pushed back -- although, I didn't see it in the IE9 slide deck -- or maybe I'm just crazy. Either way, I hope it sees the light of day, because it sounded extremely exciting from a productivity standpoint.

Converting To/From Hex with PowerShell

By Michael Flanakin @ 9:16 AM :: 53964 Views :: PowerShell :: Digg it!


If you're doing any web or WPF/Silverlight work, you're probably used to dealing with the RGB (red-green-blue) hex color format. I can't tell you how many times over the years I've opened the calculator to convert to/from hex values to either get a specific value or find out what percentage is being used. I'm sure graphic artists deal with this a lot, because I know I find it relatively annoying when I've used apps in the past that only accepted 3 decimal numbers instead of the RGB hex format. That's changed over the years, however. I will say that this is perhaps worsened by WPF and Silverlight, which have incorporated opacity using the RGBA (red-green-blue-alpha) spec, which is arguably a misnomer, since the alpha channel (aka opacity or transparency) is specified first. All that aside, I found myself wanting to find out what a certain opacity was when working on a WPF app, so instead of opening the calculator, I referred to my handy-dandy PowerShell, which is always open on my desktop.

Being a .NET developer, I knew the Convert class has the ability to convert to/from hex, so I started out with this simple one-liner to convert a hex number to its decimal equivalent.

[Convert]::ToInt32("a6", 16)

To go the other way, you simply switch out the method name and first parameter you pass in.

[Convert]::ToString(166, 16)

The first parameter is the value to convert and the second value is the base (i.e. 2 for binary, 8 for octal, 10 for decimal, and 16 for hexadecimal).From a PowerShell perspective, there are a two more things to note here, since we're accessing a static method. First, you have to surround the class name with brackets ([]); and, second, you have to separate the class and method names with two semicolons (::). Also note that, for some classes, you may need to use the fully-qualified class name, which includes the namespace.

After doing this, I remembered the numeric format shortcuts available in C#. For hexadecimal numbers, you can reference a value without treating it as a string by prefixing it with 0x. So, to convert my hex number to decimal, I was able to drastically shorten the code (can you even call this "code?").


To go the other way, we'll tap into standard string formatting logic. Knowing .NET, our first guess might be to just convert it to PowerShell, like we did before.

[String]::Format("{0:x}", 166)

Here, we're specifying a string format that renders the first parameter as hex as well as the number we're converting. This isn't saving us anything, tho. Luckily, we have a bit of PowerShell magic to shorten this for us.

"{0:x}" -f 166

I thought this was confusing the first time I saw it, but comparing it to the String.Format() method brings it home for me. Hopefully, for you, too.

I'm now converting the hex number, but that isn't telling me what the opacity is. This probably isn't even worth mentioning, because I know you're smart enough to figure this out for yourself, but we simply need to use a bit of division to get that percentage.

0xa6 / 0xff

I now know that A6 is 65%.

If you find yourself using the calculator every so often while working on something, consider keeping PowerShell in the background and just bringing it up instead. It's a great way to get used to the tool and even boost your productivity, as you get used to things you can do faster in PowerShell than via the mouse.

MSDN Subscription Updates

By Michael Flanakin @ 7:20 AM :: 3116 Views :: Tools/Utilities, MSDN Subscriptions :: Digg it!


Do you have an MSDN subscription and want to know what was updated? Are you supposed to receive DVDs, but think you are missing a few? Unfortunately, I find myself answering "yes" to both of these questions. I was ready to complain about it, but then someone pointed me to the MSDN Subscription Index. Using this site, you can search for products, view shipment contents, or just see what's new or removed in a shipment. The site has a fairly crappy experience, but at least it gives you the information. I'm also somewhat annoyed that there isn't an RSS feed. Since I find myself so curious, I'm going to try to keep up with what gets released and share it in my blog feed -- if you're only interested in these updates, there's also a feed just for the MSDN subscription updates Syndicated feed. I may be late with the updates because it's a manual process, but I'll also pursue having the MSDN team produce their own feed. I should mention that there is a feed for the latest downloads Syndicated feed. I'm going to focus strictly on the DVDs that are released. If I have time, I'll go back a few months and create separate posts for each of the releases. Hopefully, that will make the feed fairly sensible. Having one big catch-up post seems a bit much. These posts will be back-dated, so if you see this post after others, that's why.

Ya know, I'd be remissed if I didn't say I'm partially expecting someone to email me or comment with a link to an existing RSS feed. There is an MSDN Subscriptions blog Syndicated feed, but that doesn't seem to tell me what I want to know. If someone knows of a good source, I'd love to hear it.

Google Apps vs. OpenOffice

By Michael Flanakin @ 4:41 PM :: 2341 Views :: Technology, Microsoft :: Digg it!

In the past, many have talked about the desktop vs. cloud wars -- is it really a "war?" -- by comparing productivity suites like Microsoft Office and Google Apps. People have had a lot of speculation about what web apps are capable of and what is truly needed when it comes to admittedly bloated apps, like Microsoft Word; but this is the first time I think we've seen two "friendly" competitors go head-to-head: Google Apps and OpenOffice. I say, "friendly," but use that term relatively loosly. Google is very open source friendly and some may say they operate in the spirit of open source, but there's a big difference between free and "open source." Either way, the results aren't too surprising: Google Apps gets spanked. While nobody has ever said Google Apps was better than Microsoft Office, it's a pretty well known fact that Microsoft Office beats out OpenOffice. Based on the transitive property of inequality, that pretty much says Microsoft Office kicks the livin' hell out of Google Apps. And, with Office Web Access just around the corner, that's pretty much game, set, match on Google Apps. I think Paul Thorrott said it best when he talked about the "small" web-based rich text editor in Office Live and how it was better than what Google Apps had to offer.

Don't get me wrong, I'm not against web-based apps. I actually think we're a long way away from hitting the roof of what the web has to offer... and that's just the current incarnation. The platform itself needs another rev or two, tho. In the meantime, I'm excited to see what Google will come back with. We haven't seen Google react to competition much, other than speeding past very little, very sparse competition at 100 miles an hour. Google has vision, but Microsoft is one fierce competitor. The sleeping giant doesn't sleep for long.

Install Java with Microsoft Product???

By Michael Flanakin @ 4:29 PM :: 1973 Views :: Java, Technology :: Digg it!


Apparently, Sun has switched from bundling the Google Toolbar with their releases to bundling the MSN Toolbar. I'm kind of surprised they aren't using the Windows Live Toolbar, but at the same time, the MSN Toolbar has a much better experience. Whether this was sparked by Google dropping StarOffice like a bad habit or not, it's a win for Microsoft. The toolbar comes with Windows Live Search integration (duh) and, even better, uses Silverlight. There must have been some pretty high-level talks to get this approved because Silverlight is a competitor to the yet-to-be-released JavaFX, so I can't see this going thru just because Google pissed someone off. I have a feeling Sun was just trying to whore themselves out as much as possible. The MSN Toolbar deal only applies to Java downloaded by IE on Windows. Everyone else will keep the Google Toolbar based installer. I know Sun is hurting, so this probably just gives them a chance to pad their slowly declining product line.

Aside from all this, I have to say I hate these things. I wish there weren't deals like this. If you do feel the need to whore yourself out, make it disabled by default. I get aggravated when I see these things as opt-out inclusions. I don't want your crappy toolbar, I don't want an icon on my desktop, I don't want to change my homepage. Get off my freakin' back!!! Bad installer, bad!!!

On-Screen Keyboard for HTC Touch HD

By Michael Flanakin @ 1:19 PM :: 3778 Views :: Technology :: Digg it!

I've been looking for a screenshot of the on-screen keyboard that comes on the Touch HD for the past few days and have been remarkably unsuccessful. Even the HTC customer support brushed me off. Wow. Luckily, I stumbled on a video that shows how to use an external keyboard. I don't care about the external keyboard, but it does start off by showing the on-screen keyboard. Unfortunately, the keyboard doesn't seem wildly fantastic, but at least it's not as bad as the keyboard on the Blackberry Storm.

On-Screen Keyboard for HTC Touch HD

Live Search Homepage

By Michael Flanakin @ 6:04 AM :: 1832 Views :: Technology :: Digg it!

Windows Live Search Homepage

If you're not familiar with the Live Search homepage at, you should really check it out. It took a long time, but the Windows Live team finally got something out that really looks better than what you'll find on other services. I've always been a fan of the holiday themes Google and Yahoo use, but with the images on Live's homepage, I have to say there's a much better, much more interesting experience. The image changes daily and it comes with 4 or 5 regions of the image that provide some searches related to the image... usually. Sometimes they're a bit off, but other times, they're absolutely great. My favorite was the one from election day. There was a very cute section that said, "U can haz kittenz instead of politishens." Hillarious.

I try to check out the new image every day because they're very nice. I just wish I could save some as my desktop. I also wish they'd archive and make them searchable. I did talk to someone on the team, however, and it sounds like they're looking into both of these options. The issue is the licensing agreement for use of the images. Hopefully, we'll see an update to this soon. Until then, keep a look out for the latest image of the day!

Should Windows 7 be Windows 6.1?

By Michael Flanakin @ 11:30 AM :: 2002 Views :: Technology, Microsoft :: Digg it!

Windows 7

When I first heard that the next version of Windows was going to be Windows "7" -- back when that was just a codename -- I thought, "What? Wait... no!" I don't have a holistic problem with the number. My problem is more with what "Windows 7" was really supposed to be based on early talks. The chatter led me to believe it was going to be a pretty drastic change from where we are today, in the Windows world. I envisioned some drastic changes from the ground up. Then, after a few months, there was talk about the next version of Windows being codenamed Windows "7." Don't get me wrong, I'm as excited about the OS as the next guy, but it just doesn't feel like a major release. The name and version number seem to be more about correcting people's invalid perceptions about the state of Windows than actually being a major version jump. Heck, Microsoft has even waffled on whether this is a major vs. minor release. That still seems more about PR, tho.

If that wasn't enough, there's one thing that really seems to be the final "nail" in the coffin to me: Windows Server 2008 R2 will coincide with Windows 7. An "R2" release, is essentially a major service pack with a couple features thrown in. At least that's my opinion. That's been turned on it's head with the .NET 3.5 and Visual Studio 2008 SP1 of late, but historically, that's how it's worked. Above all, an "R2" release is not a major release. Of course, this isn't the first time Microsoft has fallen into the version number debacle.

PowerPoint Error: The printer "Microsoft XPS Document Writer" cannot be found

By Michael Flanakin @ 3:16 PM :: 4226 Views :: Technology :: Digg it!

Hopefully, nobody else has run into this, but I've hit a bug in PowerPoint that keeps displaying a dialog with the following error message:

The printer "Microsoft XPS Document Writer" cannot be found.

I'm on Vista 64 w/ SP1, but I don't think that has anything to do with it. While there aren't many, I did notice that others have also hit this. The problem is, nobody seems to have found a fix. After talking with people close to the dev team, it sounds like this is a postponed bug. I don't know what they meant by "postponed," other than, "it's not fixed."  The work-around is to reinstall the print driver. This surprises me, but there's not much to do about it, I guess. I wouldn't even know where to begin to reinstall the XPS print driver. Whatever. Part of me thinks it has something to do with a malformed PPTX file, but I haven't been able to validate that.

My New Favorite Shortcut

By Michael Flanakin @ 4:51 AM :: 1873 Views :: Digg it!

Keyboard shortcuts

I just discovered a new shortcut to add to my list of favorites: Alt+Esc. This moves the current window to the bottom of the "stack." Admittedly, I got a little over-excited about it at first because I thought it minimized the window. It's virtually the same effect, tho. What I'm really looking for are three things:

  1. Minimize current window
  2. Maximize/restore current window
  3. Bring window to front or top of the "stack"

If I had my way, I'd make these available with Win+Down and Win+Up for minimize and maximize/restore and Win+Shift+1 thru Win+Shift+9 to bring the first thru ninth window to the top of the stack. The latter shortcut might be problematic, when considering grouped taskbar buttons as well as the enhancements to the taskbar in Windows 7. Of course, the shortcut could simply bring up a menu, for either of these scenarios, which would still be a good enhancement.

MSDN Subscription: November 2008

By Michael Flanakin @ 10:50 AM :: 2634 Views :: MSDN Subscriptions :: Digg it!


The following consists of the English DVD updates released under the MSDN Premium (Team Suite) subscription level for November 2008.


  • Disc 2426.30 / Part X15-18258
    • Microsoft .NET Framework 3.5 Service Pack 1
    • Hyper-V™ Updates
    • Windows SharePoint Services 3.0 with SP1 (All Languages)
    • Windows Driver Kit (6001.18001)
    • Windows Mobile 6.0 Professional SDK
    • Windows Mobile 6.0 Standard SDK
    • Windows SDK for Windows Server 2008 and .NET Framework 3.5
    • Visual Basic® for Applications 6.0 SDK v6.5
    • Visual Studio® 2005 SDK v4.0
    • Windows Vista™ Media Center SDK Refresh
    • Microsoft Office Communications Server 2007 SDK (English)

Developer Tools

  • Disc 4406.01 / Part X15-18254
    • Visual Studio® Team System 2008 Team Foundation Server Workgroup Edition (English)
    • Visual Studio® Team System 2008 Team Foundation Server Service Pack 1 (All Languages)
  • Disc 4603 / Part X15-18246
    • Visual Studio® 2008 Service Pack 1 (All Languages)


  • Disc 2436.37 / Part X15-18270
    • Antigen
    • Commerce Server 2007
    • Forefront™ Security
    • Identity Lifecycle Manager 2007 w/ Feature Pack 1
    • Office Communications Server 2007
    • Search Server 2008
    • SQL Server® 2008
    • System Center Configuration Manager 2007 w/SP1
    • System Center Essentials 2007 SP1
    • System Center Operations Manager 2007 w/SP1
    • System Center Mobile Device Manager 2008 (English)
    • Internet Security and Acceleration (ISA) Server 2006 SP1 (All Languages)


  • Disc 0001 / Part X15-18560
    • MSDN® Subscriptions Library, November 2008 Edition (English)

For more information, see the MSDN Subscriptions Index.

Get Netflix's Latest Watch Instantly Player Today

By Michael Flanakin @ 9:30 AM :: 2238 Views :: Technology :: Digg it!


Netflix recently announced a new version of its "Watch Instantly" player that supports both Windows and Mac. I don't quite have much use for the latter, but I have been eagerly awaiting an update to the player. The player is very basic and, while it does what it needs to, it leaves me wanting more. After the announcement, I diligently started watching the a movie. Low and behold, nothing changed. Netflix made a comment about slowly rolling the player out, so I figured I'd just have to wait a little longer. Then, Netflix announced that we could opt-in for the new player ourselves. Score!

Unfortunately, the player doesn't the feature I've wanted the most: the ability to go to the previous and next episodes in a series. I've also wanted subtitles, but that's slightly less important. Beyond that, the player has some nice upgrades, like the still shots shown when you fast forward or rewind. I tend to watch more online than I rent these days, so I'm glad to see the player upgraded and hope they keep at it! I really want to see upgrades to the player a lot more frequently.

I saw something about keyboard shortcuts, but I didn't find anything very useful. I did, however, find a way to get some debug/diagnostic information. If you're interested, simply use Ctrl+Shift+Left Click to see a diagnostic menu with a few options you may or may not be interested in. Nothing too terribly special, tho. I doubt many would even care.

Visual Studio 2010 and .NET 4.0 CTP

By Michael Flanakin @ 8:06 AM :: 1731 Views :: Digg it!

Visual Studio

It took me a while to find this download link, so I figured I'd share it. If you want to give Visual Studio 2010 (and .NET 4.0) a shot, you're only 11 files and ~7.2 GBs away!

Visual Studio 2010 y .NET 4.0

En Español

Me tomó un rato para encontrar esta descarga, así que quiero compartirlo. Si queires a probar Visual Studio 2010 (y .NET 4.0), usted es sólo 11 archivos y ~7,2 GBs fuera de él.