How to: Install Hyper-V environment on top of ESXi 5.1 onwards

Of course, mainly this post is related to testing environments where you would need to setup a Hyper-V Cluster on one ESXi virtual server. So we start off by creating the virtual machine as per instructions below.

Create new Virtual Machine
Select Custom type
Enter the name of the Virtual Machine
Select Virtual Machine Version 8

As Guest Operating System select Other
As Version Select Other (64-bit)
Select 2 virtual sockets
Select 2 cores per virtual socket
On the Network Connections select the E1000E as the adapter type

Select the LSI Logic SAS as SCSI Controller

Finish answering any other questions required to create the Virtual Machine. Once it has been created and placed into your inventory, do the following modifications.

Right click on the machine and click on Edit Settings
Go to Options tab and click on General under Advanced Node
Click on the Configuration Parameters button

Click on Add Row
As the name, enter hypervisor.cpuid.v0
As the value enter FALSE

Now under the Options Tab, click on General Options
Change the version of the OS to VMWare ESXi 5.x (Experimental)

Press OK to apply the changes, when ready right-click on the server and select Upgrade Virtual Hardware

Now browse the data-store and edit the VMX file of the virtual Machine

On the guestOS parameter enter "winhyperv"

At the very end of the file enter the below line:

featMask.vm.hv.capable = "Min:1"

Now upload the edited VMX file. Start the machine and install Hyper-V and virtual machines.

How to: Upgrade Lync server from evaluation to full

When you are evaluating the Lync server and you want to upgrade or install the full version, you can do it easily without re-installing or reconfigure the service. You can also upgrade when your evaluation has expired.

If your evaluation has expired, you will notice that you Lync Front-End Server doesn’t start and you will see the Windows could not start the Lync Server Front-End on local computer error showing. To confirm this, you must go on the Lync Server section on the Event Viewer and see that it is complaining about the license as below.

The evaluation period for Microsoft Lync Server 2010 has expired. Please upgrade from the evaluation version to the fully licensed version of the product. Look at help for Setup.exe to learn how to upgrade from evaluation version to the licensed version.
Cause: The evaluation period for Microsoft Lync Server 2010 has expired.

To upgrade to the full version you need to download the setup in your server. Then open the Lync Management Shell and enter the below.

Get-CsServerVersion (This will show the current version of the system)

Browse to the location of the installation of the full version example C:\LyncFull\Setup\AMD64\Setup and run the below command.

msiexec.exe /fvomus server.msi EVALTOFULL=1 /qb
Enable-CsComputer

Once ready enter again the Get-CSServerVersion to verify that the version has been updated.

Note: This must be done on all servers of Lync i.e. Director, Front-End and Edge

How to: Connect Remotely to an Exchange Management Shell

Powershell is a great tool and sometimes you need to connect to your prefered Exchange server without opening a remote desktop on the server. To connect remotely to any Exchange Management Shell you need the following:

To connect to the server using the logged-in user type,

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://my-exchange-server/PowerShell/ -Authentication Kerberos

and then type

Import-PSSession $Session

If you want to connect to the server using specified credentials, type the following,

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://my-exchange-server/PowerShell/ -Authentication Kerberos -Credential $UserCredential

Import-PSSession $Session

That should connect you to the desired server… enjoy

How to: Move mail queue to another server in Exchange

When having an Exchange server failing and you need to move your current mail in the queue which is stuck or the server is failing, you will need to export the queue and import it to another working Exchange server. This is how to do it.

– Open a Powershell on the source server
– Type $array = @(Get-Message -Queue "QueueName" -ResultSize unlimited)
– Type $array | ForEach-Object {$i++;Export-Message $_.Iden.ty |
AssembleMessage -Path ("c:\MyMailQueues\"+ $i +".eml")}

This will export all the mail in the queue specified in the ‘QueueName’ into the folder c:\MyMailQueues. From now copy the EML files created, into the other server’s Transport Pickup folder. The emails should be instantly be processed.

How to: Allow application to relay through Exchange server

When having applications to explicity relay mail inside or outside your network with Exchange server you might have some problems. This can be solved by creating a Receive connector in your Exchange infrastructure. This can be done as below:

Open Exchange Management Console
Navigate to Server Configuration and Hub Transport
Select the server
Right click on the Receive connector area
Select New Receive Connector
Enter the name for the connector
Select Custom
On the Local Network settings click Next
On the Remote Network setting enter the IP address or range from where the emails will be sent
Once created open the properties of the connector
Open the Permissions Group tab
Tick Anonymous Users and Exchange Servers
Open the Authentication tab
Tick Transport Layer Security (TLS)
Tick Externally Secured (for example, with IPSEC)

Try to send the email and there you have it.

Fix: The In-row data page count for object is incorrect when running integrity check on SQL

When running an integrity check on your databases, you may get the following error on some databases.

Description: Executing the query "DBCC CHECKDB(N'mydb')  WITH NO_INFOMSGS  " failed with the following error: "The In-row data myrow page count for object "my_table", index ID 0, partition ID 52794353778688, alloc unit ID 52794353778688 (type In-row data) is incorrect.

This is due to the fact that the database in question was imported from another or older version of your current SQL server. This can be fixed by running the below command on the databases in question.

DBCC UPDATEUSAGE (dbname)

dbname = The name of your database

When the database is indeed one which is failing the integrity check you will see the below sample message.

DBCC UPDATEUSAGE: Usage counts updated for table 'mytable' (index 'mytable', partition 1):
DATA pages (In-row Data): changed from (2) to (1) pages.
USED pages (In-row Data): changed from (25) to (24) pages.
RSVD pages (In-row Data): changed from (41) to (40) pages

If the database doesn’t need to update it’s usage you will simply get the message below.

DBCC execution completed.

Once you have executed the update-usage on all databases which are failing, run the integrity check again and swish, it works.

 

 

How to: Recover Cisco configuration and access when password is lost

When loosing your credentials on a Cisco router, you can recover it all if you have physical access to it. You have to connect with the console cable and do the following:

Turn off Device
Turn on Device
Press CTRL C or CTRL Break Until rommon 1> shows
Enter confreg

Select as below:
do you wish to change the configuration? y/n [n]: y
enable “diagnostic mode”? y/n [n]:
enable “use net in IP bcast address”? y/n [n]:
disable “load rom after netboot fails”? y/n [n]:
enable “use all zero broadcast”? y/n [n]:
enable “break/abort has effect”? y/n [n]:
enable “ignore system config info”? y/n [n]: y
change console baud rate? y/n [n]:
change the boot characteristics? y/n [n]:
Configuration Summary
(Virtual Configuration Register: 0x2142)
enabled are:
load rom after netboot fails
ignore system config info
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-
do you wish to change the configuration? y/n [n]: n
You must reset or power cycle for new config to take effect

Enter reset
Wait for 2 minutes, turn off and on the device
Would you like to enter the initial configuration dialog? [yes/no]: no

Press enter to start
You should see Router>
Enter ena
Enter copy start run

Enter conf t
Enter user admin privilege 15 password 4dm1n
Enter enable secret 4dm1n (or whatever)
If need by change the VTY passwords
Enter copy run start

Enter do sh ver to see the register
Configuration register is 0x2142
Now enter config-register 0x2102
Enter do sh ver to confirm the register has been updated
Enter copy run start
Restart Router

Make sure no shut on all interface

Fix: SQL Server Database Services feature state failed during upgrade

During an SQL version upgrade I have encountered that during the checkup, you will get the error stating that Database Services feature state failed. This can be fixed by finding the registry entry below and changing as follows.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.\ConfigurationState.

Change all values from 2 to 1 for all Four items in the right pane.

Re-Run the rule on the installation. Now it will be solved and through.

Fix: The action couldn’t be completed when searching in OWA 2010

When searching through OWA 2010, you may get the error “The action couldn’t be completed. Please try again.“.

You may also notice that the Application Event Viewer shows the error “Function CISearch::EcGetRowsetAndAccessor detected that content indexing was disabled for database ‘MailboxStoreName’ because of error '0x80041820' from MSSearch.“. Also you may notice the the Microsoft.Exchange.Search.ExSearch.exe task is using a considerate amount of CPU.

This may be due to an issue with SP1, and it’s advisable to upgrade to at least SP2, but if you still are experiencing this issue with SP2 or SP3, to fix it please follow the below instructions.

– Have SP2 or SP3 for Microsoft Exchange 2010 downloaded and extracted.
– Open the folder in command prompt to the extracted folder
– Run setup.com /PrepareAD
– Run setup.com /PrepareSchema
– Restart the Microsoft Exchange Search Indexer service
– Restart the Microsoft Information Store service