Wednesday, 25 April 2018

Hyper-V Manager Error Connecting to Windows 2012 R2 Host Server

If you come across the following error while trying to connect to a Windows 2012 R2 Server Hyper-V host from a Windows 2016 Server using Hyper-V Manager:




You can run the following command on the Windows 2012 R2 host server:
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof


Should fix it right up for you.

Warning: Please be aware that this change will break the firmware function on generation 2 Guests. For instance, as illustrated below the option to choose boot order becomes very limited.

Sadly the only fix for this it to reinstall the Hyper-V Role on the server, so please be aware of it.






Tuesday, 6 February 2018

Hyper-V 2016: Virtual Guest Stuck in Starting in SCVMM


I had a VM-guest get stuck in state "Starting..." in Virtual Machine Manager for a clustered Hyper-V system. 

Refreshing the guest, host or cluster did not help.
Restarting the VM-host where the VM-guest was stuck did not work either. 

Most options were greyed out when right-clicking the guest, only showing "Refresh" and "Connect or View" which in turn only showed network. 

Logging into the VM-Host where the guest was situated according to SCVMM showed in Hyper-V Manager that the guest was not on that host. 


After logging into the other hosts of the cluster I found the guest on one of the other hosts. VMM still showed it to be on the same (incorrect) host as before.

After some troubleshooting back and forth I finally tried opening up the Failover Cluster Manager on one of the hosts and went to Failover Cluster Manager - <Clustername> - Roles.

 I marked the VM-guest with the "Starting..."-problem and live migrated it to one of the other hosts.

This cleared the status in SCVMM and show the server nice and tidy on the host where I moved it.

Monday, 5 February 2018

Powershell: Restart a Windows Server

To continue the tradition of using Powershell for normal activity we would otherwise do using the Windows Graphical Interface here is a quick intro to using the command Restart-Computer to restart your server or computer.


Thursday, 1 February 2018

Powershell: Install all RSAT Tools on Windows Server 2016


To get all administrative tools installed easily on a Windows 2016 Server one simple cmdlet is available.

Powershell: Ipconfig command


A good way to get into a routine of learning Powershell is to do your usual command prompt commands in Powershell instead. For me ipconfig was one of those commands.

Wednesday, 31 January 2018

Powershell: Test a TCP port to see if it is open


Instead of having the trouble of installing Putty or some other program to every new server or workstation you can easily check if a TCP port is open to a specific IP-Address or DNS name with powershell.

Monday, 11 December 2017

Powershell: How to Clear a Variable


Clearing a variable is quite straight forward. One thing to keep in mind though is to leave the $ out of the command.
Also if the variable is an array, we need to remember to remake it into an array again.