Monthly Archives: February 2013

How do I find the Cisco MSE Version Number via command line?

If you are trying to find the version number of your Cisco Mobility Services Engine, SSH into the machine and execute the following command:
/etc/init.d/msed status

You should see something similar to the output below:

[root@MYMSE ~]# /etc/init.d/msed status
STATUS: Starting MSE Platform, Waiting to check the status. MSE Platform is up, getting the status

-------------
Server Config
-------------

Product name: Cisco Mobility Service Engine
Version: 7.0.220.0
Hw Version: V01
....

Hope this helps!

How to validate numeric-integer input in C

I had one of my buddies ask me how to validate input in C today... Turns out the task is kind of daunting. I thought I could get away with the following below:

int status, input;
status = scanf("%d", &input);
while(status!=1){
	printf("Incorrect number... please try again: ");
	status = scanf("%d", &input);
}

but the problem is you receive an infinite loop. The reason behind this is when you hit return\enter on your keyboard, a newline character is passed in as input. These extra hidden characters are what is messing with your input and spawning the infinite while loop. Luckily, I was able to parse through the extra characters one-by-one and get something working.

Hopefully this helps someone else!

#include<stdio.h>
int main(void){
	// input	user input -- hopefully a number
	// temp		used to collect garbage characters
	// status	did the user enter a number?
	int input, temp, status;

	printf("Please enter a number: ");
	status = scanf("%d", &input);
	while(status!=1){
		while((temp=getchar()) != EOF && temp != '\n');
		printf("Invalid input... please enter a number: ");
		status = scanf("%d", &input);
	}

	printf("Your number is %d\n",input);
	return 0;
}

How to activate Lync Evaluation to Licensed Version

Have Lync 2010 Standard, Enterprise or Lync 2013 in evaluation mode and want to activate it with your licensed version? Here are the steps to do it!

  1. Download the Lync Server version from the Microsoft Licensing portal (or where ever else you obtain your licensed software).
  2. Extract the ISO to a folder/burn it to a disk and pop it into the Lync server.
  3. Open up the Lync Server Management Shell as an Administrator
    1. Start->All Programs->Microsoft Lync Server 2010 (or 2013)->Lync Server Management Shell
  4. Navigate to the installation media
    1. cd PATHTOYOURLYNCSERVERINSTALLER\Setup\amd64\Setup
  5. Execute the following command
    1. msiexec.exe /fvomus server.msi EVALTOFULL=1 /qb
  6. Use the following command to update the services
    1. Enable-CsComputer
  7. Use the following command to verify your copy of Lync is now licensed
    1. Get-CsServerVersion