Author Archives: Stan Peetoom

26 Oct


Question: Since I changed my computer name, the SQL database engine no longer starts.  How can I correct this problem.

Answer: The MSDE database engine inherits the computer name as the SQL Database Server name.  If you change the computer name, the SQL Server will no longer start and will indicate it is corrupt or has been tampered with.  You can correct this by changing the computer name back and then starting the SQL Server database engine using Start / Startup / Service Manager.

For specific instructions on installing SQL Sever- click here.

However, if you need to change the computer name, you must backup the data files, uninstall the MSDE and then reinstall it.  In order to do so, you will need to take the following steps:

  1. Exit ExpressMaintenance if it is running.
  2. Using Start / MSDE / Service Manager, stop the SQL Server if it is running, then close.
  3. In the system tray (lower right corner) if SQL Service Manager is running, right click and exit.
  4. Using windows explorer, go to C:\MSSQL7\Data and copy the two data files (ExpressMaintenance_Data.MDF and ExpressMaintenance_Log.LDF) from that folder to the C:\ExpressTech folder where Maintenance.exe resides overwriting the original files that are in C:\ExpressTech folder.  Make sure you have successfully copied the files.  You might want to copy these files to another backup folder on the C drive as well as a precaution.
  5. Using Start / Control Panel / Add & Remove Programs, uninstall the MSDE Database Engine.
  6. Remove the MSSQL7 or MSSQL folder completely.
  7. Download the MSDE2000Install.exe file from our website at the following link: Direct Download into the C:\ExpressTech folder.   Note that we no longer recommend using the MSDE7 as ExpressMaintenance now fully supports MSDE2000.
  8. Install the MSDE2000 by running the MSDE2000Install.exe file just downloaded.  Do Not download and install ExpressMaintenance as it will overwrite your good data files.  Note: If you did not properly uninstall the MSDE and instead just removed the folders, you will likely need to remove it from the registry in order to get the re-installation to work properly.  For details on how to do this, see the information below.
  9. When the installation is complete and the Service Manager appears, click Auto Start checkbox and Start the SQL Server, then close Service Manager.  Do not start any other services in the Service Manager.
  10. Run ExpressMaintenance and it will prompt to create the new database.  Click Ok or Yes and it will create the database.  However, instead of using the blank as the model, it will use your real database since you copied it into the C:\ExpressTech folder over the model.
  11. Finally, once the program is up and running with your data, check our website at the following link to insure you have the latest release.  If you do not, download and install latest update – Software Updates.

Registry Note

If you did not properly uninstall the MSDE and instead just removed the folders, you will likely need to remove it from the registry in order to get the re-installation to work properly.  To do this, click on Start / Run and enter “regedit”.  When the Registry Editor opens, you must delete the registry key found at \ Hkey_Local_Machine \ Software \ Microsoft \ MSSQLServer.  Right click on the key to delete it and then exit the registry editor.

25 Oct

Remote Desktop Services deployment using Windows PowerShell

Excerpt from MSDN.

Hi, my name is Omair Gillani and I’m a program manager on the Remote Desktop Virtualization team. Remote Desktop Services (RDS) for Windows Server 2012 Release Candidate offers an integrated management experience in the new Server Manager, which makes it easy to deploy, configure, and manage RDS end-to-end. For admins who prefer scripting and automation, one of the great new capabilities added to RDS for Windows Server 2012 Release Candidate is a new Windows PowerShell layer. This provides a powerful mechanism to automate setup for, configure, and manage a complete Remote Desktop Services deployment.

I hope that this post helps you get started deploying Remote Desktop Services by using the Windows PowerShell script.  We focused on providing a great GUI administration experience as well as a great scripting experience.

In this post I focus on using script to deploy a single server virtual machine-based desktop deployment by using a Windows 7 Service Pack 1 (SP1) virtual desktop template image.

Let’s start with the prerequisites.


The requirements for setting up a Remote Desktop Services deployment are as follows:

  1. Install Windows Server 2012 on a Hyper-V capable computer.
  2. Join your server to a domain.
    1. RDS requires all its servers to be added to a domain. The domain needs to have a DHCP server so that IP addresses can be assigned to desktops in a new virtual desktop collection.
  3. Create a virtual desktop template to be used when creating a virtual machine-based desktop deployment.
    1. Specify Win7Gold as the virtual machine name; this virtual desktop template will be used by the Windows PowerShell cmdlets to create virtual desktops for the managed pooled virtual desktop collection.  · The detailed process can be found at Create Virtual Machines.
    2. Install Windows 7 Enterprise with SP1.
    3. Install Hyper-V Integration Services  · From the Hyper-V manager console, select Connect under the Actions pane to launch the virtual machine connection.  · On the Action menu, select Insert Integration Services Setup Diskclip_image002  · In the AutoPlay dialog box, select Install Hyper-V Integration Servicesclip_image004
    4. On the virtual machine, ensure that the operating system has been sysprep generalized by using the following command line:  · sysprep.exe /generalize /shutdown /oobe
  4. Use a domain admin account or a domain user joined to the local Administrators group to run the Windows PowerShell script. The local admin account will not work in this case.
    1. Also ensure that the Windows PowerShell window is launched as administrator.

New Remote Desktop Services deployment

The new Remote Desktop Services virtual machine-based desktop deployment will be set up in two main steps:

  1. Create a new deployment
  2. Create a new Windows 7 SP1 managed pooled virtual desktop collection

You can find the complete script for creating a single server Windows 7 SP1 virtual machine-based desktop deployment on the Script Center The script takes the name of your server as well as the domain it is joined to as parameters.

Create a new deployment

The first step in creating an RDS virtual machine-based desktop deployment is installing and configuring the relevant role services. In Windows Server 2012, a single Windows PowerShell cmdlet will both install and configure the RD Connection Broker, RD Web Access, and RD Virtualization Host role services. The cmdlet also allows for any number of RD Virtualization Host servers to be specified for larger deployments.

Figure 1 below shows the first 14 lines of the Windows PowerShell script that will set up a new RDS deployment on a single server. It takes the name of the Hyper-V capable server as a parameter. The script will install all required RDS role services on this single server. The script imports the RemoteDesktop Windows PowerShell module. It then calls the Windows PowerShell New-RDVirtualDesktopDeployment cmdlet to install the RD Connection Broker, RD Web Access, and RD Virtualization Host role services on the server and configure them to have a working RDS deployment.

  1 param (
  2     [Parameter(Mandatory=$TRUE, HelpMessage="FQDN of RD Web Access\RD Connection Broker and RD Virtualization host roles")]
  3     [String]
  4     $serverName,
  6     [Parameter(Mandatory=$TRUE, HelpMessage="Domain name to be used for new desktops created")]
  7     [String]
  8     $domain
  9 )
 11 # Import the RemoteDesktop module
 12 Import-Module RemoteDesktop
 14 # Create a new RDS deployment
 15 New-RDVirtualDesktopDeployment -ConnectionBroker $serverName `
 16    -WebAccessServer $serverName `
 17    -VirtualizationHost $serverName
 18 Write-Verbose "Created new RDS deployment on: $serverName"

Figure 1: Script lines 1-18

Note: This Windows PowerShell script needs to be run on a remote computer because it requires a restart after installing the RD Virtualization Host role service.

You can use the Get-RDServer cmdlet to get the list of servers and role services that were installed for the newly created RDS deployment.

Create a new managed pooled virtual desktop collection

Now that we have a working RDS deployment, let’s create a new managed pooled virtual desktop collection by using Windows PowerShell. Figure 2 shows the remaining part of the Windows PowerShell script; this will use the New-RDVirtualDesktopCollection cmdlet to create a managed pooled virtual desktop collection by using the virtual desktop template created as part of the prerequisites.

  1 Grant-RDOUAccess -Domain $domain  -OU "Computers" -ConnectionBroker $serverName
  3 # Create a new pooled managed desktop collection
  4 New-RDVirtualDesktopCollection -CollectionName demoPool -PooledManaged `
  5    -VirtualDesktopTemplateName Win7Gold `
  6    -VirtualDesktopTemplateHostServer $serverName `
  7    -VirtualDesktopAllocation @{$serverName = 1} `
  8    -StorageType LocalStorage `
  9    -ConnectionBroker $serverName `
 10    -VirtualDesktopNamePrefix msVDI

Figure 2: Script lines 20-29

This cmdlet will export the template virtual hard disk (VHD) and then create a single virtual machine in the pool and publish this on the RD Web Access portal. We can now connect to the desktop by going through the RD Web Access portal.

This single Windows PowerShell script enabled us to have a completely automated working RDS deployment. The RemoteDesktop module offers the complete range of Windows PowerShell cmdlets that you need to set up, configure, and manage your Remote Desktop Services deployments.

For more information on using Windows PowerShell for Remote Desktop Services also see Travis’s blog at