Upgrading SQL Evaluation to Volume License

THE SCENARIO

  • You’ve installed SQL 2008 R2 (or newer) in 180-day evaluation mode as a pilot project (or proof-of-concept).
  • The project is successful and you get a green light.
  • The client purchases SQL through Microsoft Volume Licensing.
  • You want to simply add the license key to the SQL server that’s currently in evaluation mode, activate it, and move on.

THE RUB

  1. And if you look up your keys in Microsoft Volume Licensing Service Center (MS VLSC), there are no keys for SQL.Dude - where's my SQL volume license keys
  2. And the second problem is that even if you had the key, the location to enter the SQL key on the trial server isn’t very obvious.

SOLUTION 1 – How to Get Your MS VLSC SQL Key

If you call Microsoft Volume License support, they will tell you that the keys are imbedded in the product (which is true) and that they can not give you the key information (which may or may not be true, depending on who you’re talking to).

Even worse, the VLSC tech support folks will advise you to remove the SQL installation, download the VLSC ISO, and install FROM SCRATCH.

This is a complete waste of time and a bunch of garbage!

Side note: I asked the VLSC support specialist why there’s a place to enter the key in SQL if the Volume License version of SQL doesn’t have a key. She said “That key is just for if you purchase Retail SQL”.

Again, this is complete garbage!

Rest easy and fear not! — You don’t have to reinstall SQL all over again just to activate it with a volume license key.

Here’s the work-around I used:

IMPORTANT: These steps are on a Hyper-V Server.
NOT on your SQL Evaluation server!

  1. Log into Microsoft Volume Licensing Service Center and download your SQL ISO (this ISO is pre-keyed).
    https://www.microsoft.com/Licensing/servicecenter/

    Download the pre-keyed SQL ISO from VLSC

  2. Spin up a generic Server 2012 or 2012 R2 virtual machine in Hyper-V.
    (This should only take about 5 minutes if you have a pre-baked VM).
  3. Add the .NET 3.5 Framework

    GUI version
    Server Manager | Manage | Add Roles and Features | Next | Next | Next | Next | .NET Framework 3.5 Features | Next | Install

    PowerShell
    Install-WindowsFeature Net-Framework-Core

  4. Attach the SQL Volume License ISO to the virtual machine.

    Attach the ISO to the virtual machine

  5. Boot the VM, set the admin password in the OOBE windows, then run the Setup.exe file on the SQL DVD / ISO.

    Double-click the SQL Setup.exe installer

  6. Run the program without getting any help.*

    *If you get a compatibility error on 2012 R2 with SQL 2008 R2, you can safely ignore it. (We’re just using this VM to get the key and will blow the VM away when we’re done).

    Ignore this error 

    …the setup bootstrapper continues…

    wait

  7. Installation | New installation or add features to an existing installation.

    New installation of SQL on the Hyper-V VM (temporary

  8. Run the program without getting help.
    (Ignore the Program Compatibility Assistant warning again.)

    Ignore this error too

    …as the SQL turns…

    more waiting

  9. On Setup Support Roles, click OK.

    Please put your tray tables and seat backs in the full upright position to prepare for departure

    …more SQL zzzzzz…

    stuck on the tarmac

  10. …and BOO-YAH, there is your Microsoft Volume License key for SQL!

    Touchdown! Here's your SQL Volume License key!

  11. Record that SQL Volume License key in a safe place.
  12. You can now shut down and blow away that virtual server.

SOLUTION 2 – The Key Entry Location

Here are the instructions for where to install the SQL Volume License key on your trial server to activate it into a full-blown VL goodness.

IMPORTANT: These steps are on the SQL EVALUATION server.
Make sure you have a good backup of the server before you continue!

  1. Start | All Programs | Microsoft SQL Server 2008 R2 | Configuration Tools | SQL Server Installation Center (64-bit)

    SQL Server Configuration Manager

  2. Maintenance | Edition Upgrade

    Edition upgrade

    …SQL churns…

    Circling the airport

  3. On the Setup Support Rules page, click OK.

    Click OK again

    …more SQL churning…

    Last wait period

  4. Enter the product key | Next.

    Enter your SQL Volume License key here

  5. Accept the EULA | Next.

    Accept the EULA

  6. Specify the instance of SQL Server (the evaluation one) | Next.

    Pick your SQL instance

    …waiting…

    duh!

  7. On the Edition Upgrade Rules page, click Next.

    Click next

  8. On the Ready to upgrade edition page, click Upgrade.

    Click Upgrade

  9. Congratulations, you’re done! Click Close.

    Click close.

Hopefully this tip will save you from the ‘mandatory’ reinstallation of SQL just to change from evaluation mode to a Volume License key.

VN:F [1.9.20_1166]
Rating: 9.6/10 (36 votes cast)

PowerShell 5.0 May 2014 Preview – Gotcha

I case you haven’t heard, the Windows Management Framework 5.0 Preview May 2014 got released at TechEd 2014 this week.

Link: http://blogs.msdn.com/b/powershell/archive/2014/05/14/windows-management-framework-5-0-preview-may-2014-is-now-available.aspx

Windows Management Framework 5.0 Preview May 2014

Once installed, you should be seeing version 5 in the PowerShell console.

PowerShell 5.0 Preview May 2014

There’s some awesome stuff in PowerShell 5.0 preview (like PowerShellGet). Jeffrey Snover and Don Jones had two *awesome* PowerShell presentations at TechEd North America 2014 this week, shown below:

DCIM-B318
Windows PowerShell Unplugged with Jeffrey Snover
Speakers: Don Jones, Jeffrey Snover
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/DCIM-B318

Windows PowerShell Unplugged with Jeffrey Snover

DCIM-B418
Windows PowerShell Best Practices and Patterns: Time to Get Serious
Speaker: Don Jones
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2014/DCIM-B418 

Windows PowerShell Best Practices and Patterns: Time to Get Serious

PowerShell 5.0 Preview GOTCHA

Per the release document, do NOT install Windows Management Framework 5.0 Preview May 2014 on Windows Small Business Server 2011 Standard. It’s not supported yet.

Don't install WMF 5.0 Preview on SBS 2011

VN:F [1.9.20_1166]
Rating: 5.5/10 (2 votes cast)

Download – PowerShell 4 Quick Reference Guide

Title: Windows PowerShell 4.0 and Other Quick Reference Guides
Published: 04/23/2014
Publisher: Microsoft / PowerShellMagazine.com
Size: 2.08 MB
Download URL: Click here for download

DESCRIPTION

Quickly learn tips, shortcuts, and common operations in Windows PowerShell 4.0, Windows PowerShell Desired State Configuration, Windows PowerShell Workflow, Windows PowerShell ISE, Windows PowerShell Web Access, Server Manager for Windows Server 2012 R2, WinRM, WMI, and WS-Man.

CONTENTS

  • Windows PowerShell 4.0 Examples
  • Windows PowerShell Integrated Scripting Environment (ISE) 4.0
  • Windows PowerShell 4.0 Language Quick Reference
  • Windows PowerShell Desired State Configuration Overview
  • Windows PowerShell Web Access
  • Elements of Windows Management Infrastructure (WMI)
  • WMI in Windows PowerShell 4.0
VN:F [1.9.20_1166]
Rating: 9.8/10 (4 votes cast)

PowerShell Tip – Get List of VMs, MACs, IPs & VHDs

Sometimes I wish you could add more fields to the Hyper-V Console, like MAC Addresses or IP Addresses.

As always, PowerShell to the rescue!

Here’s a quick tip to get a list of virtual machines on a Hyper-V host, along with the MAC addresses and IP addresses.

Here’s the PowerShell code:

Get-VM | Select -ExpandProperty NetworkAdapters | Select VMName, MACAddress, IPAddresses

And here are the results:

PowerShell code to get a list of VMs, MACs & IP Addresses

As you can see from the screen shot above, only *running* VMs show IP addresses.

Want to take it a step further and see which VMs are running Legacy NICs and which VMs have Synthetic NICs? Even virtual switch names?

Easy enough – just lose the second filtering statement.

Get-VM | Select -ExpandProperty NetworkAdapters

PowerShell - show legacy NICs in use on VMs

And this one is for Stanley…

Need a list of which VHDs are attached to which VM?

Get-VM | Get-VMHardDiskDrive | Select-Object -Property VMName, VMID, ComputerName, ControllerType, ControllerNumber, ControllerLocation, Path | Sort-Object -Property VMName | Out-GridView -Title "Virtual Disks"

PowerShell - list of virtual hard disks per VM

Source: PowerShell blog & Keith Mayer’s blog

VN:F [1.9.20_1166]
Rating: 9.7/10 (3 votes cast)

Free eBook – Secrets of PowerShell Remoting

eBook - Secrets of PowerShell RemotingTitle: Secrets of PowerShell Remoting
Author: Don Jones with Tobias Weltner and Dave Wyatt
Publisher: PowerShell.org
Published: Nov 2013
Pages: 92
PDF: SecretsOfPowerShellRemoting.docx
Size: 6.58 MB
Price: FREE
Download URL: Click here for download

DESCRIPTION

The authors set out to write this guide because they were getting a lot of questions about some of the trickier bits of PowerShell Remoting, and wanted to provide an authoritative resource for people seeking to configure Remoting properly for a variety of situations. The guide was started by Don Jones, and Tobias Weltner came aboard to provide a great deal of additional material and improvements. Along the way, numerous members of the PowerShell community contributed their expertise as technical reviewers, suggested additional content to include, and so forth – truly making this a collaborative, group effort.

This eBook is updated so check the download URL above from time-to-time to check for newer / updated versions.

Also, other free eBooks from PowerShell.org can be found here:
http://powershell.org/wp/newsletter/

  • Secrets of PowerShell Remoting
  • Creating HTML Reports in PowerShell
  • The Big Book of PowerShell Gotchas
  • Making Historical and Trend Reports in PowerShell
  • The Community Book of PowerShell Practices

If you really want to follow what’s going on in the PowerShell community, check out the PowerShell.org and following Don Jones on Twitter: @concentrateddon

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)

Stupid PowerShell Tricks – Getting Your PC to Talk

WarGamesRemember the 80’s? (Too young?)

One of my 80’s favorites was the movie WarGames.

(Hint: You should really watch it on Netflix – it’s a classic.
Here’s the WarGames movie trailer for you kids.)

Anyway, for those of you who DO remember War Games, that speech synthesizer was pretty creepy back in the day.
But it was equally cool because speech was pretty rare in those days unless you had a Texas Instruments TI-99/4A (which I did – woot!)

It’s hard to believe that movie came out 30 years ago, and technology has changed a lot. Windows has had speech built in for quite some time, but did you know you can access the speech API with PowerShell?

Who cares, right? WRONG! It’s pretty fun! And it’s a good bit of code to use to prank your IT co-workers. (Think login script or batch file that runs as a scheduled task…)

Here is a video demo of Windows Server 2012 reading classic computer lines from the movie WarGames:

“Joshua” from WarGames (1983) as played by Windows Server 2012 & PowerShell

 

Not too shabby for a Windows Server, eh?

So, shall we play a game?

Below is the PowerShell code for you to play with and tweak.
Have fun annoying people!

WarGames.ps1

Copy-and-paste code for WarGames.ps1

<#
.SYNOPSIS
    This script employs the Speech API for speaking
    and quotes lines from the movie "WarGames" (1983)
.DESCRIPTION
    At the beginning load the Speech API, create a SpeechSynthesizer object.
    It uses this object’s Speak method to speak
.NOTES
    File Name : WarGames.ps1
    Code From : DimiG | http://www.youtube.com/watch?v=Fg6icbeHWVY
    Requires  : PowerShell Version 2.0
.EXAMPLE
    Just for tutorial
#>

# Add text for speaking here
$text = @(`
"Hello, my name is Joshua.",`
"Greetings Professor Falken.",`
"Shall we play a game?",`
"Of course. I should reach DEF CON 1",`
"and launch my missiles in 28 hours.",`
"Would you like to see some projected kill ratios?",`
"What’s the difference?",`
"You are a hard man to reach.",`
"Could not find you in Seattle",`
"and no terminal is in operation at your classified address.",`
"D O D pension files indicate current mailing as:",`
"Dr Robert Hume,",`
"AKA Stephen W Falken,",`
"5 Tall Cedar Road.",`
"Strange game.",`
"The only winning move is not to play.",`
"How about a nice game of chess?"`
)

# Load the dll
[System.Reflection.Assembly]::LoadWithPartialName("System.Speech") | out-null

# Create new object
$spk = New-Object System.Speech.Synthesis.SpeechSynthesizer

# Step Up Volume
$spk.SetOutputToDefaultAudioDevice();
$spk.Volume = 100

# Check out voices installed on this computer…
$spk.GetInstalledVoices() | %{$_.voiceinfo}

# Now say…
$spk.Speak($text)

Props: DimiG for the PoSh code

VN:F [1.9.20_1166]
Rating: 7.7/10 (3 votes cast)

PowerShell – Move AD FSMO Roles in Server 2012

Over the long weekend we worked on two projects:

  1. Upgrade the Hyper-V hosts on the cluster at the data center
  2. Finish prepping a new Hyper-V host and Domain Controller for a new branch office with a new subnet

imageSince the cluster at the data center holds all of the Active Directory FSMO roles we needed to transfer the roles to an alternate location on the MPLS network so that project 1 didn’t slow down or stop project 2.

PowerShell to the rescue!

WHICH SERVER HOLDS THE FSMO ROLES?

Open PowerShell as an Administrator and type:

netdom query fsmo

You’ll see each of the 5 FSMO roles and which domain controller holds them.

Using PowerShell to transfer FSMO roles

The 5 FSMO roles are numbered 0-4:

0 – PDCEmulator
1 – RIDMaster
2 – InfrastructureMaster
3 – SchemaMaster
4 – DomainNamingMaster

Why do we care what those numbers are? Because we can move the FSMO roles very quickly and save a lot of typing.

For example, which PowerShell command is easier to type?

Move-ADDirectoryServerOperationMasterRole -Identity “Target-DC” -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator

Or this one?

Move-ADDirectoryServerOperationMasterRole -Identity "Target-DC" -OperationMasterRole 0,1,2,3,4

Personally, if you’re moving all the roles at once to the same DC (like when doing some server maintenance) the 0,1,2,3,4 is easy.

Once you type in either of those commands you are prompted with several options for confirmation.

Y, A, N, L, S or ?

Moving FSMO roles with PowerShell

OPTIONS:

If you choose “Y” for Yes, PowerShell will prompt you to move each role,
then move to the next role, like this.

PowerShell FSMO role transfer - individual confirmation

If you choose “N” for No, PowerShell will skip transferring that role.

If you choose “A” for All, PowerShell will try to transfer all 5 roles to Target-DC.

If the transfer of a FSMO role fails PowerShell will let you know loud and clear.

PowerShell FSMO role transfer message

CONFIRMATION:

Unfortunately, if the transfer is successful you basically don’t get any confirmation of the role transfer.

You’ll need to run NETDOM QUERY FSMO to double-check who has the roles.
NETDOM QUERY FSMO to double-check FSMO role location

Side note – Once nice thing about using PowerShell to transfer the FSMO roles is that you can script the transfer to run at a scheduled time (so you don’t forget to put the roles back where they should be later).

Also, I didn’t have to load the Active Directory PowerShell module – Windows Server 2012 does that for me automatically.

VN:F [1.9.20_1166]
Rating: 9.4/10 (84 votes cast)

Downloads – June 2012

Recent batch of useful downloads from Microsoft:

WINDOWS 8

WINDOWS SERVER 2012 / POWERSHELL 3.0

HYPER-V

INTUNE

OFFICE 2010

VOLUME LICENSING

KINECT

.NET

SHAREPOINT 2010

SECURITY

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)