leejghardy has written 32 posts for Lee J G Hardy

Windows Server Backup Failed Recovery

I was trying to recover a Hyper-V server from a volume/system state backup created by Microsoft DPM 2010 using Windows Server Backup (WSB) on a new Windows Server 2012 R2 host, as part of a Disaster Recovery project. In the following post I use MYSERVER to replace the actual server name. DPM had backed up … Continue reading

Free online training at Microsoft Virtual Academy

I came across the Microsoft Virtual Academy a few days ago, and was pleasantly surprised by the amount of free educational material on offer there. I thought I’d share it here for anyone who isn’t aware of it, I’d say its definitely worth taking a look at. And there’s also free Microsoft Press ebooks you … Continue reading

Windows Server 2008 R2 Hyper-V host hanging at login causing cluster failover

We had an issue on the hosts in our Hyper-V cluster where after a reboot they would take several minutes to log in, hanging at the Welcome screen. This was causing our cluster to become unstable and failovers of VM’s to occur. The solution we found was to run devnodeclean on each of the hosts … Continue reading

Import Dynamics CRM Organisation using PowerShell and a User Mapping File

The following PowerShell script can be used to import a CRM 2011 organisation using PowerShell and a User Mapping File to map the required users only. We use this command when we restore production SQL backups to our development servers in order to change the user and administrator accounts that are used (different to production). … Continue reading

Infrastructure Planning: SQL Clustering and Mirroring

I created a few diagrams for a brief at work on our options for planning the mirroring or clustering of our SQL servers. Included is information that may prove helpful, and also examples of failovers. I included is a zip file for download with the actual Visio files in that you can use and edit … Continue reading

Hyper-V virtual machine failed in failover cluster, showing pending status and cannot boot

We had a SAN failure this weekend on our 2008R2 Hyper-V Failover Cluster, this dropped all VM’s within the cluster and left us with a few VM’s unable to boot. In failover cluster manager, selecting the VM displayed the status as failed, and selecting the cluster node that hosted the VM shows its status as … Continue reading

Exchange server bulk mail send using PowerShell

I recently had to check the capacity of our Exchange 2007 Server due to having delays of several hours for email sends and receives. I created the small PowerShell script attached to send 1000 emails through the server. Feel free to download and modify as required. It turns out it was a bad Server 2003 … Continue reading

Restore SQL database from .bak as a different name

Follow the below to restore an MS SQL database backup (.bak) as a different name, changing the paths to the .bak, .mdf and .ldf files as appropriate in your environment. The only caveat with this is that the Logical Names of the database will remain the same as the database it was restored from, though … Continue reading

PowerShell scripts to create one or more Hyper-V Virtual Servers

In this post you’ll find a couple of PowerShell scripts that I wrote to create Hyper-V servers with system resources specified when you run the scripts. The scripts, CreateSingleServer.ps1 is the one to use to create a single server and CreateMultipleServers.ps1 is used to create multiple servers and don’t require any external PowerShell modules apart … Continue reading

Windows Server: The trust relationship between this workstation and the primary domain failed

This can be a bit of an issue when it happens on a server joined to an Active Directory domain. I recently restored a Windows Server 2008 R2 virtual server to an earlier version using a snapshot in Hyper-V, restarted the machine and when trying to log in using domain credentials I got the error … Continue reading