vSphere “Operation failed, diagnostics report: A vmkernel nic for the connection point already exists.” when migrating vmkernel from vSwitch to dvSwitch (cisco Nexus 1000v)

When trying to migrate a  vmkernel from a vSwitch to a Nexus 1000v switch I got the error:

Operation failed, diagnostics report: A vmkernel nic for the connection point already exists.

The problem was that I could not see this vmkernel in the GUI.

Resolution:

To fix the problem I SSHed into the ESX which had the problem.

I ran the following command to list the vmkernels:

esxcli network ip interface list

In the list I could see a vmkernel connected to the Nexus 1000v that I could not see in the GUI.

I used the following command to remove it:

esxcli network ip interface remove --interface-name=vmk0

After I removed the vmkernel I could migrate it from the vSwitch to the Nexus 1000v with no errors.

Posted in vmware | Tagged , , , , , | Leave a comment

How to time a command in Powershell

Sometimes it is useful to know how long a command or script uses to complete. This is how you do it in Powershell.

Measure-Command -Expression { dir }

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 6
Ticks             : 68425
TotalDays         : 7,91956018518518E-08
TotalHours        : 1,90069444444444E-06
TotalMinutes      : 0,000114041666666667
TotalSeconds      : 0,0068425
TotalMilliseconds : 6,8425

If you want to see the output of the command you can do the following:

Example 1: This will tell you how long time the dir command uses to complete:

$sw = [Diagnostics.Stopwatch]::StartNew(); dir; $sw.Stop(); $sw.Elapsed

Example 2: This will tell you how long the script called script.ps1 uses to complete:

$sw = [Diagnostics.Stopwatch]::StartNew(); ./script.ps1; $sw.Stop(); $sw.Elapsed
Posted in Uncategorized | Leave a comment

Change HPE BladeSystem Onboard Administrator key length

If you got version 3.56 or newer of HPE BladeSystem Onboard Administrator you can change the key length via. cli.

SSH into your OA and run the following command (in this case it will set the key length to 2048)

c7000> generate key all 2048
Posted in Uncategorized | Tagged , , , | Leave a comment

Skype for Business: User can’t see precense on other users if they have not added him to contacts

I came across a problem where a Skype for Business (SfB) user didn’t see the presence on other users if they had not added him to their contacts.

Solution
Renamed the lync\SfB-profile on the user’s computer:
It should be a directory with a name starting with sip_ located under
%UserProfile%\AppData\Local\Microsoft\Office\15.0\Lync

After this Lync/SfB created a new profile and the presence showed up again.

Posted in Skype for Business, Windows Server | Tagged , , , , | Leave a comment

New-MailboxExportRequest error on NetApp share. Workaround.

When I tried using New-MailboxExportRequest to export a mailbox to a .pst file I kept getting this error:

New-MailboxExportRequest -FilePath "\\server.domain.com\mailboxexport$\billy.pst" -MailBox "billy"

The server or share name specified in the path may be invalid, or the file could be locked.
 + CategoryInfo : NotSpecified: (0:Int32) [New-MailboxExportRequest], RemotePermanentException
 + FullyQualifiedErrorId : ACDD8B0,Microsoft.Exchange.Management.RecipientTasks.NewMailboxExportRequest

I checked that I could access and write to the share from the CAS servers. No problems there. Then I made sure the AD group “Exchange Trusted Subsystem” had modify access to the share. And that my user had permission to use New-MailboxExportRequest using the command below.

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User "domain\adminuser"

I still got the same error. So I added Verbose to the command to see a more verbose output

New-MailboxExportRequest -FilePath "\\server.domain.com\mailboxexport$\billy.pst" -MailBox "billy" -Verbose
...
VERBOSE: [13:00:40.329 GMT] New-MailboxExportRequest : The server or share name specified in the path may be invalid,
or the file could be locked. --> The account used is a computer account. Use your global user account or local user
account to access this server.
...

A you can see the problem is that computer authentication on the share does not work. Some kind of Kerberos issue I think. I tried debugging it by checking SPNs on the computer objects of the CAS servers and the NetApp SAN computer objects in AD, but I could not find what was causing the problem.

My workaround was to run the “Microsoft Exchange Mailbox Replication” service as a service account and not local system.

SOLUTION:

Create a service account and set the service “Microsoft Exchange Mailbox Replication” to run as it.

exportimport

Then set modify (or full) permissions to the service account on the share.

Now it should work 🙂

Posted in Exchange, Powershell, Uncategorized, Windows Server | Tagged , , , , , , , , | Leave a comment

KMS activation of Windows 10 in Windows Server 2012 R2

First of all you need to find the correct KMS key. You should not use the Windows 10 KMS key that you find in the download section of Microsoft Volume Licensing Center. To find the correct key you need to go to “Relationship Summary” located in the Licenses menu in Microsoft Volume Licensing Center. In the summary, click on your active license id and choose the “Product Keys” tab. Here you need to locate “Windows Srv 2012R2 DataCtr/Std KMS for Windows 10”. Copy that key.

If you try to install this key in VAMT you might encounter this error.

The product key you entered is not supported. Check the key and try again.

The product key you entered is not supported. Check the key and try again.

The solution is to first uninstall the current KMS key from the server and then install the new key using command line with the following commands:

Uninstall product key
PS C:\Windows\system32> .\cscript.exe .\slmgr.vbs /upk
Install the new key
PS C:\Windows\system32> .\cscript.exe .\slmgr.vbs /ipk XXXX-XXXX-XXXX-XXXX-XXXX
Restart the Software Protection Service
PS C:\Windows\system32> Restart-Service sppsvc
Check that the new newly installed key is the correct key
PS C:\Windows\system32> .\cscript.exe .\slmgr.vbs /dlv

kms10-dlv

The output of the command should say that your activation channel is “VOLUME_KMS_2012-R2_WIN10”.

If this is a new KMS server the server needs 25 or more license requests before it starts activating Windows (or 4 or more Windows Server Requests before it starts activating Server OS’es).

Happy activation!

Posted in Uncategorized, Windows Server | Tagged , , , , , , , , , , , , , , | Leave a comment

Chrome extension to open link in Google`s cache database

I made my first Chrome extension yesterday. This extension is used to open a link in googles cache database. In some situations this extension can be used to bypass pay walls of websites.

Usage: Right click a link and chose “Open Cached Version”.

[Download link]

Posted in Uncategorized | Leave a comment

VMware: A general system error occurred: No connection could be mande because the target machine actively refused it.

I ran in to this error today in my vSphere environment when I tried to power on a virtual machine.

Power On virtuel machine

A general system error occurred: No connection could be made because the target machine actively refused it.

It turned out that the problem was that the “VMware vCenter workflow manager” was stopped. So the solution was to start the service.

Posted in Uncategorized, vmware | Tagged , , , | 2 Comments

Change device name of a SPK-B bluetooth audio module

I bought the BLK-MD-SPK-B for the possibility to change the device name with an AT-command. But when I got it hooked up UART it turned out that the change name command did not work. Bad luck.

The way to change the name was to burn it in to the configuration in the EEPROM-chip:

First you must solder the tiny chip off the board, use tweezers to lift it from the board when you warm up pins.

EEPROM chip soldered off

Tiny EEPROM chip soldered off

Hook the chip up to an EEPROM programmer.

EEPROM hooked up

Read the data from the chip and save a backup to a file. Then locate the device name.

eepromdump

Replace the old name (in my case “BT-Speaker”) with the name you want for the device (I renamed mine to “Marsboer”) and then write it to the chip.

Yay!

Posted in Uncategorized | Tagged , , , , , , , | 24 Comments