Code Formatting for Windows Live Writer and WordPress

Just to save you the trouble, here is the best code formatter for windows live writer when publishing to wordpress.  This is more of a reminder for myself so’s I don’t have to scour the web to find this again, but hopefully this will save someone else some time in trying to track down a good code formatter.  You can grab it here.

It’s the one that I’m using in the latest posts on this site.  If you scroll to the earlier posts, you’ll definitely notice the difference.

View Remote Drive Space in Powershell

Quick script to view the drive information for remote systems in powershell.  Just pass in the server name as a param.

	[string]$ComputerName = ""

$drives = gwmi win32_logicaldisk -filter "drivetype=3" -ComputerName ($ComputerName)
$server = @{n = "Server"; e = {$_.__SERVER}}
$free = @{n = "FreeSpace(GB)"; e = {"{0:N2}" -f ($_.FreeSpace/1GB)}}
$Size = @{n = "Size(GB)"; e = {"{0:N2}" -f ($_.Size/1GB)}}
$Label = @{n = "Volume Name"; e = {$_.VolumeName}}
$Percentage = @{n = "PercentageFree"; e = {"{0:N2}" -f `
	([Int64]$_.FreeSpace / [Int64]($_.Size) * 100)}}
$drives | select $server, $Label, DeviceID, $free, $Size, $Percentage | ft -auto


Manually uninstall sql server

Note, this works for Sql Server 2005 only!! If, for some reason Sql Server does not uninstall cleanly or at all, here are a few processes that you can use to
manually uninstall sql server.

If you’re on a clustered server, the first step you’ll want to take is to make sql server think it is no longer part of a
cluster. To achieve this, you’ll need to modify a key within the registry. Secondly, ensure that the data disks are
located on the node that you are attempting to remove sql server from.

Open the registry editor by typing regedit at the run command.


Next, navigate to HKLM\Software\Microsoft\Microsoft SQL Server\<instid>\Setup, where <instid> represents the specific instance of SQL Server 2005 being uninstalled. Under this key, set the SqlCluster value to 0.


If you don’t have Sql Server under the Add/Remove Programs, you’ll have to reinstall the Sql Server support tools. Navigate to the Sql Server install, and execute the SqlSupport.msi under Servers\Setup.


Next, open up a command prompt and navigate to c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap. Type in ARPWrapper.exe /Remove. This should start the uninstall of sql server. If you have multiple instances on this machine, only uninstall one instance at a time, otherwise the uninstall will error.


For more drastic measures, see this article.