The site is back online

After a problem with the web site about six months ago, I have recreated the Tardis Technologies blog.  Unfortunately, the WordPress database format changed a little bit, so I need to do some work to get it back in a format for posting.  The first post is back online.  I hope to get the rest of the old content online soon.


Want to add color to PowerShell code in your docs?

I was writing a Word document and wanted syntax highlighting for my PowerShell scripts.  It turns out that ISE (Integrated Scripting Environment) has an extension for copying text with color (and for copying text with color as HTML).  Just do the following:

  1. Install the PowerShellPack.msi file from here.
  2. Open ISE and your .ps1 PowerShell file.
  3. In the bottom third of the window, enter the following PowerShell command:
    1. Import-Module PowerShellPack
  4. You will now see an Add-ons menu in ISE; it may have already been there.
  5. Highlight the PowerShell code you wish to copy and choose Add-ons, IsePack, Edit, Copy-Colored from the menu.
  6. Now switch to Word and paste in your PowerShell code with full syntax highlighting.
  7. You can also use Copy-ColoredAsHtml to put syntax-highlighted HTML into your clipboard.
  8. Note that Ctrl-Shift-C will perform the Copy-Colored function and Ctrl-Alt-Shift-C will perform the Copy-ColoredAsHtml function.

This information came from “How to Insert Formatted Windows PowerShell Code on TechNet Wiki (en-US)“.

File Hashing Is Built Into Windows

I always used to download the md5sum.exe and sha1sum.exe files when I needed to generate a file’s hash in Windows.  I just discovered that certutil.exe, included with Windows 7 and Windows Server 2008 R2, will do this for you (I’m not sure if it was included in earlier versions of Windows).  Just use the following commands to generate the appropriate hash:

  • MD5:  certutil -hashfile C:\Windows\notepad.exe MD5
  • SHA1:  certutil -hashfile C:\Windows\notepad.exe SHA1
  • SHA256: certutil -hashfile C:\Windows\notepad.exe SHA256
  • SHA512: certutil -hashfile C:\Windows\notepad.exe SHA512

Note that it defaults to SHA1 if you do not specify a hashing algorithm.

Making Image Backgrounds Transparent with Paint.Net

I found this solution on the web site:

  • I use the Bucket (fill) with a full transparent color.
    • Set the foreground to white and fully transparent, i.e. RGB all = 255, Transparency – Alpha = 0
    • Set the background to white and not transparent, i.e. RGB all = 255, Transparency – Alpha = 255
  • You have to change the tool parameters from “Normal blend” to “Overwrite” in advance, or you won’t see any effect.
    • Tool = Bucket Fill
    • Flood Mode = Contiguous
    • Fill = Solid Color
    • Tolerance = 17%
    • Antialiasing = Enabled
    • Overwrite
  • You can access the parameters after choosing the bucket. Press the little chemical bottle icon, in the right to the fill tolerance slider.

Visual Studio 2010 / SP1 / Windows SDK Install Order

When you plan to install the Windows 7/2008 R2 SDK, the SDK needs to be installed before VS2010 SP1.  Here is the recommended install order:

1. Visual Studio 2010
2. Windows SDK 7.1
3. Visual Studio 2010 SP1
4. Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1

Here is the link to the blog post about this: