Windows Server 2016 – Application Errors after a P2V conversion Event ID 1000 Error

October 30, 2018

After converting a Physical server to a VM, I got a lot of Application Errors 1000.

Looking at the details it was relating to, amongst others, HP related drivers and software

Example : This error shows it is trying to reach a Tape device which is not present in a VM…



First uninstall all hardware drivers that are not needed in the new VM.

1. Open CMD with admin privileges and run this command

set devmgr_show_nonpresent_devices=1

2. Next run this command




3. Make backup of your VM

Before going to next step MAKE SURE you have a good backup of the current SYSTEM STATE

4. Expanded list

Look at all the GREYED out devices and UNINSTALL these Software and Drives


5. Uninstall COM Objects

From the Event Viewer Error I could see we where dealing with a COM related DLL

Use WBEMTest.exe to investigate if the COM Object is still in use.


In my case I was sure it would not be needed since the HW was not available anymore

Look for the COM DLL : HPWMITape.dll


Run the uninstall command :

regsvr32 /u HPWMITape.dll

Enjoy !

PowerShell – Using PoSH SSH Module to shutdown a Synology NAS

October 29, 2018


Shutting down a Synology NAS has to be done using an SSH client. And using ROOT access.


This is how this is done using the famous PuTTY SSH client

Connect to your NAS


Once connected make sure you change to ROOT Access

This is done using this command :

sudo -i


Next enter : Poweroff

Of  course you can use Powershell to obtain the same result using the PoSH-SSH module.

See here for more info :

Keep in mind that in order to run ‘sudo’ commands you need to use “Invoke-SSHStreamExpectSecureAction” command.


New-SSHSession -ComputerName NAS_IPAddress -Port ** -Credential (Get-Credential)
$stream = New-SSHShellStream -Index 0
Invoke-SSHStreamExpectSecureAction -ShellStream $stream -Command 'sudo -i' -ExpectString 'Password:' -SecureAction (read-host -AsSecureString) -Verbose

Enjoy !

Windows 10 – DotNet Development NO Visual Studio

October 16, 2018

Recently I needed to develop an VPN Builder for Windows 7 for the L2TP protocol.

To automate the VPN entries on the client and to hide the Private Shared Key for the user.


PowerShell can do this…  But does not support the cmdlet Add-VpnConnection onWindows 7

It is only available for Windows 10 Sad smile



1. Download the DotRas Library from the Nuget site


Tip : Winking smile

When you have saved the .nupkg package you can just open this using 7-Zip


Extract the nice documentation file DotRas.chm that is included.


And extract the DotRas.dll (for your appropriate .Net version 2.0 or 4.0)

In my case I used the DotNet 2.0 version


2. VB.Net Source code

On the net you can find relevant source code to build your application for L2TP, if you want to have a head start.

And modify to your own needs ….


3. Compile your application

You can use the commandline compiler VBC.exe that is part of your local DotNet installation on any Windows machine.

Or you can use my Visual Studio Light wrapper  Smile


%systemroot%\Microsoft.NET\Framework\v2.0.50727\vbc.exe /nowarn /nologo /quiet /debug- /t:Winexe VPN_L2TP_Builder.vb /r:DotRas.dll -out:VPN_L2TP_Builder.exe -win32resource:VPN.res


As you can see I needed to reference the DotRas.dll Assembly and I used the custom Resources to assing a custom ICON and File Properties.

See here on how to build a custom Resource file using Resource Hacker


4. Result



As you can see we don’t need 10 ton of software, just to build a simple functional DotNet Application Smile


Some extra tips for L2TP errors here  Winking smile


TIP : 

To avoid an “appcrash” you need to make sure that you compile it on the same OS as where the .EXE is going to be used !

In this case it is Windows 7 !



Resource Hacker – Update File Icon & Resource Data

October 15, 2018

As you might know by know I am not a big fan of installing 10 ton of software to get my simple things done.

One of them is adding file versioning or file Icons to my custom build .Net applications.

For which I use my also my custom build or wrapper for Visual Studio

If you need to add you custom ICON and or VERSIONING

You can use some compiler options, see here for the full list vbc compiler or  csc compiler options.


Download Resource hacker

I still use an old Version 3.4, which still runs fine.


1. Open your compile .exe file


2. Add or Replace Icons

Right click the 0 in the ICON section and Select Replace


3. Add or Replace File Properties

Select 0 in the Version Info section


Modify the File Property Values according to you needs. And click on the COMPILE button.

Next save this as a RESOURCE file.


For Example : My.res

Once this is done you can pick the settings up when compiling your VB or C# application, using this compiler option :


Example : –win32resource:My.res

See here in a real life example


Enjoy !

Windows 10 – Quickly connect to a VPN

October 12, 2018

In Windows 10 it is a pain to quickly select a VPN connection. Especially when you have a long list of entries in there.

On top of the sort order does not always stay the same Sad smile

And most frustrating is, is that it is very slow…


Windows 7 and Up has a build in little tool called RASPHONE.exe

It is located in the System32 directory :


When you run it, it will quickly list all the entries to select from and connect to your relevant VPN server.


Once selected you can connect or change the properties …


All Windows VPN entries are automatically stored in your rasphone.pbk file located in the %Appdata\Microsoft\Network\Connections\Pbk folder

This little built in tool is lightning fast compared to the Windows 10 network settings…



1. Pin this Tool to your taskbar and you are ready to go ! Smile

2. Here is an other freeware tool that can help you automatically reconnect when the connection drops



Windows 10 – SkypeForBusiness no micro sound

October 5, 2018

After Updating to the latest Windows 10 build, I did not have any sound going out using the built in Microphone of the laptop ?

First I thought I had to update the audio driver to the latest version…


So I did but no success Sad smile



I decided to use the Voice Recorder to test the sound


But there was a message saying that I had a Mic issue and needed to allow this audio first.


Go to Microphone Settings :



This will open the Microphone settings panel



Now make sure Skype is selected as allowed Microphone sound.



Solved Smile