Category Archives: General

Downgrading you ClearDB MySql database in Azure

Are you running a website or application in Windows Azure with data stored in MySql? I upgraded my database from the free database with a maximum of 20 Mb to the 1 GB option, costing me $9.90 a month. Well, I cleared it out and was going to do a downgrade from payed to free again. Well, it seems ClearDB doesn’t really like downgrading since the Revenue stream goes sour… So you’re on your own and need to create a new database and manually (woop!) migrate data. Feels like we’re back to 1886.

Login to ClearDB site
Create a new database in the free plan
Copy server name, user name and password to a textfile, or just remember it all 🙂
Download MySql Workbench from Oracle (
Install Workbench (next, next, finish)
Get the server name, user name and password to your existing database, wp-config.php has it or check the connection strings for your Azure website.




Configure MySql Workbench to connect to old server
 Dump database










Edit dump file to reflect new server and database name. Or make corresponding changes in Workbench, but this is easier to explain.









Import/restore to new database in Workbench










Edit wp-config.php to reflect new server name









Verify it all works by reloading your website in your browser. (important!)

Delete old database on ClearDB site. This will also clear your payment plan. Login to Amazon and verify your payment authorizations to make sure.

PDT user creator in, hold it… PowerShell!



Well, I’ve read about it. I’ve tried some. I’ve never written one myself. But it finally happened! Using the PDT (PowerShell Deployment Toolkit) I’ve come to realise that creating the users and groups in my lab Environment takes some time. And what’s better to go PowerShell when it’s time to create a new script, don’t wanna be seen doing old vb-scripts 🙂

If you haven’t tested PDT yet, go do it instantly! It’s written by Rob Willis from Microsoft, and he has saved me at least 200 hours already. Check it out at


Copy / save as PDTUserCreator.ps1

# Script creates users, ou:s and groups for PDT #
# Created by Joachim Nässlander, Microsoft #
# #
# #
# Script provided as-is #
# #

# Import module and check for write permissions
Import-Module ActiveDirectory
try {
New-ADUser -name TemporaryUser -SamAccountName TemporaryUser
Remove-ADUser TemporaryUser -Confirm:$false
Write-Host “No write permissions in Active Directory”

# Create arrays, passwords, get domains and stuff
$SecurePDTUserPassword=$PDTUserPassword | ConvertTo-SecureString -AsPlainText -Force
$PDTGroups=”AC Admins”, “OM Admins”, “CM Admins”, “SM Admins”, “Orchestrator Admins”, “VMM Admins”, “DPM Admins”, “SQL Admins”
# Check / create ou’s
if (dsquery ou domainroot -name HQ)
else {
New-ADOrganizationalUnit -Name “HQ” -Path $DistName -ErrorAction SilentlyContinue
foreach($ou in $PDTOUs){
if (dsquery ou domainroot -name $ou)
else {
New-ADOrganizationalUnit -Name “$ou” -Path “OU=HQ,$DistName” -ErrorAction SilentlyContinue
# Check / create groups
foreach($group in $PDTGroups){
if (dsquery group -samid $group)
else {

New-ADGroup -Name $group -GroupScope Global -Path “OU=Groups,OU=HQ,$DistName” -ErrorAction SilentlyContinue
# Check / create users
foreach ($user in $PDTusers){
if (dsquery user -samid $user)
New-ADUser -Name “$user” -SamAccountName “$user” -ChangePasswordAtLogon 0 -AccountPassword $SecurePDTUserPassword -Description “PDT created user” -Enabled 1 -Path “OU=Users,OU=HQ,$DistName”
Add-ADGroupMember -Identity “SQL Admins” -Members “!sql” -ErrorAction SilentlyContinue
Write-Host “PDT users, groups and OU’s created”

The blue badge!

Haven’t posted for quite a while, have been waiting for everything to settle down and become official. But as of November 1:st I’m employed by Microsoft and as such I’ve got my own blue badge. I’ll be working as a TSP with the System Center suite of software. This moves my focus away from cluster / hyper-v / server core a bit, but knowing myself I probably won’t let that go either.

At the moment I’m in the middle of the boarding process, getting my machine up to speed, parking permits, phone numbers, access to internal systems and all that. But soon I’ll be at a meeting near you, or at a conference or user group. Have any SC-related questions? Email me at jonas (at)!


Unboxing the Samsung Slate

The Samsung Slate is a fantastic device and now that I’ve finally gotten my hands on one (thank you SO very much!) I’ll share my experiences with you.

Unboxing stuff is always exciting and I’m glad to say that Samsung actually manages to give the user a great experience, it’s not a PC in a cardboard box. It’s a good looking box, the Slate is positioned on top and makes you wanna rush through it all…

But I didn’t. Click the picture to have a walkthrough of unboxing the Samsung Slate!

Once unboxed I started it, it’s blazingly fast!

It came installed with Windows 7 with the touch features enabled. Quite easy to use with the pen, but of course I still decided to go for Windows 8 Consumer Preview. That’ll be another post, quite fascinating how to install the OS on this baby!

Read more about the slate here:
Read more about Windows 8 Consumer Preview:

In the following posts we’ll take a look at OS installation, using Windows 8 and I’ll try to see if I can use the Slate instead of my laptop for a whole week at work!