Some of the BIG brands that use Lync

As the popularity of Lync grows, some of the biggest brands on the planet are deploying Lync technology. Some of these brands you may have head about using Lync, but most of them you may not have heard yet. I’ve been collecting some of these brand names for a while now and I though I would share them with you in no particular order;

Mattel

Dolby

Dell

HP

Disney

Dominos Pizza

AMC Theatres

Activision

Procter and Gamble

Alstom

AMF Bowling

BBC

British Telecom

Telstra

Best Buy

BMW Group

Boston Pizza

Broadcom

KPMG

Deloitte

Bvlgari

Comcast

Delta

Foxconn

Fujitsu

Morgan Stanley

Goldman Sachs

ING

Intel

JetBlue

Johnson & Johnson

Merrill Lynch

Ministry of Sound

Nestle

New York Times

Nokia

The Times

Vodafone

Volvo

Wall Street Journal

Posted in Uncategorized | Leave a comment

How to enable Firewall TCP ports on Windows Server using powershell

If you ever need to powershell script the allowing of traffic through the builtin windows firewall, its very easy to do.

New-NetFirewallRule -DisplayName “Enterprise Commander HTTP” -Direction Inbound –Protocol TCP –LocalPort 80 -Action allow

New-NetFirewallRule -DisplayName “Enterprise Commander SSL” -Direction Inbound –Protocol TCP –LocalPort 443 -Action allow

The above commands poke holes in the firewall for port 80 and 443. You then just need to enable the profile with the following.

Set-NetFirewallProfile -DefaultInboundAction Block -DefaultOutboundAction Allow -NotifyOnListen True -AllowUnicastResponseToMulticast True

Job done.

Posted in 2008, 2008 R2, 2012, Hyper-V 2012 SP1, Power Shell, Windows Server | Tagged , | Leave a comment

Virtual disks don’t re-attache after a reboot.

Not sure what MS was thinking when they build this feature, but it seems that virtual disks don’t automatically re-attach after a reboot. Why would I go to all the trouble to make the virtual disk if I didn’t want it to work? Got me.

Anyway, luckily its not a complicated thing to fix in power shell.

 Set-VirtualDisk -FriendlyName [FriendlyNameOfMyDisk” -IsManualAttach $false

You can find the friendly name of your disk in server manager (if you forgot what it was).

A1

And can someone please explain what this isn’t a setting in the virtual disk properties UI?

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

Some of the BIG brands that use Lync

As the popularity of Lync grows, some of the biggest brands on the planet are deploying Lync technology for internal use. Some of these brands you may have head are using Lync, but most of them you may not know are using it yet. I’ve been collecting some of these brand names for a while now and I thought would share them with you. You can click the names for more info. In no particular order;

Mattel

Dolby

Dell

HP

Disney

Dominos Pizza

AMC Theatres

Activision

Procter and Gamble

Alstom

AMF Bowling

BBC

British Telecom

Best Buy

BMW Group

Boston Pizza

Broadcom

KPMG

Deloitte

Bvlgari

Comcast

Delta

Foxconn

Fujitsu

Morgan Stanley

Goldman Sachs

Intel

ING

jetBlue

Johnson & Johnson

Merrill Lynch

Ministry of Sound

Nestle

New York Times

Nokia

The Times

Vodafone

Volvo

Wall Street Journal

Wells Fargo

Yale

Yum Brands (KFC)

And thats just to name a few….. there are hundreds of brands that you know and love using Microsoft Lync and more deploying all the time. If you would like to check out my full list, you can go to www.lynced.org.

Posted in Uncategorized | Tagged | 1 Comment

How to find which server is the primary server in a pool for Lync users

Yes, that’s right, lync users have a “home” server within a pool – who knew?

So we all know that lync users have a primary lync front end pool (and may also have a backup pool), and front of the pool is normally some sort of a load balancer that spreads the load between all servers in the pool. Well although that is all basically correct, there are also some extra bits that are good to know.

When a client attempts to connect (register) to a lync pool, it hits the load balancer and is connected to a pool. If the server is not the home server for the user, it is issued with a redirect to the actual home server. The home server is actually decided by an algorithm that performs a hash of the users sip address and creates a map of the servers in the pool to produce a list of preferred servers from the “home” server to the last one.

The hashing algorithm looks something like this;

int num = 0x65;
uint num2 = 0;
foreach (char ch in user.ToCharArray())
{
                num2 = (uint)((num * num2) + (ch & ‘\x00df’));
}
num3 = (int)((((ulong)num2) % ((long)this.permTable.MaxValue)) + ((ulong)1L));

 

More this topic soon.

Posted in Uncategorized | Tagged | Leave a comment

Reverse engineering power shell commandlets

If you have ever wanted to find out how a power shell cmdlet works? Well, its easier than you might think. The first thing you need to do is look at your cmdlet, which you can do with a very simple command: get-module.

get-command -type cmdlet [your command]

Below is a sample output from the command.

Image

 

The output reveals some great information, but the key bits are;

  • DLL
  • ImplementingType

Now that you have this information you need a tool to help reverse engineer the actual cmdlet. Something like .net reflector will do the trick nicely. There is a free trial of this tool as well so you can get started right away. 

Now all you need to do is to load the assembly mentioned in the DLL field of the get-module command. The output shows you where on the filesystem the dll is and all you need to do is to load it.

To find the actual code that executes the command, just expand the object/method mentioned in the ImplementingType field and you have a complete view of how it works. Easy as pie.

Posted in Uncategorized | Tagged | Leave a comment

Getting a list of the worst queries on MS SQL Server

It’s always good to understand what is going on in your SQL server. Particularly if your trying to find a performance bottleneck. There are lots of tools out there that will help you do this, but sometimes you just need a quick understanding of whats going on to make some adjustments.

Here is a SQL query that will show the worst 100 queries.

SELECT TOP 100
total_worker_time/execution_count AS AverageCPUTime ,execution_count AS ExecutionCount
,(SELECT SUBSTRING(text,statement_start_offset/2,(CASE WHEN statement_end_offset = -1 THEN LEN(CONVERT(nvarchar(max), text)) * 2
ELSE statement_end_offset
END -statement_start_offset)/2 ) FROM sys.dm_exec_sql_text(sql_handle)) AS query_text
FROM sys.dm_exec_query_stats
ORDER BY AverageCPUTime DESC

If you then wish to clear the query cache to get a better idea of how any changes you made have affected performance you can do the following. You run this as a query.

DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS

 

 

Posted in Uncategorized | Tagged | Leave a comment

Fixing a failed netapp disk – disk assign

Our Netapp SAN had a disk fail on it the other day. Unfortunately it was out of maintenance, so I had to fix the disk myself. Sourcing the disk was a pain as Netapp don’t seem to want to sell you spares, so I turned to my local IT supplier who sourced a disk with HDS with the same part number of the disk that failed.

Installing that new disk was easy, but it didn’t work. Netapp in their dash for your cash have special firmware on their disks that stop the average punter from replacing disks with random spares. So that left me with 2 options; one was to flash the firmware and the second was to buy another disk with the proper firmware. I did both.

I’ll leave the firmware update to another post and talk about replacing the disk I got from e-bay here.

E-Bay actually had a number of sellers with disks that had the correct Netapp part number. Of cause they are all second hand, but the prices are good enough that I bought 4 of them instead of the one I needed.

To actually bring the disk on-line its quite simple. All you need to do is log into Netapp with privileges and then assign the disk.

priv set advanced

That command will give you advanced privileges and let you run the commands you need. Now you need to find the new disk.

disk show -v

Disk show -v will list all the disks, along with their pool and controller id’s. The new disk should stand out as it will be different from the rest. It”l have a different owner name because it came from a different system. You then just need to assign the disk to the controller using the disk assign command.

disk assign [diskid] -s [controllerid] -f

The disk ID is the Device  from the list of disks and the controller ID is the number in brackets in the home column.

All done. The disk should now show up as a spare for when you do a sysconfig -r.

You may also want to zero the spare disk to make sure that if another disk fails, it is spared in the shortest possible time. To do this use the following command.

disk zero spares

 

Posted in NetApp | Leave a comment

List all Lync Front End servers that are hosting a Response Group in power shell

Gee, this one should have been simple to do, but it wasn’t. Basically because of some commands returning strings and some returning objects.

$pools = Get-CsApplicationEndpoint -Filter {OwnerUrn -like "*RGS*"} | select-Object RegistrarPool -unique | foreach { $_.RegistrarPool } | Select-Object FriendlyName | foreach { $_.FriendlyName }; Get-CsPool | Where-Object { $pools -contains $_.Identity } | Where-Object { $_.Services -like "*Reg*" } | Select-Object Computers | foreach {$_.Computers}

If you paste that command into your Lync power shell you should get a list of all servers that host a response group in your Lync Environment.

Posted in 2010, 2013, Microsoft Lync, Power Shell | Leave a comment

How to list all Response Groups Application pools in Powershell

I needed to find quick way to list all the Registrar Pools that host the RGS application in my Lync environment. It was a reasonably simple powershell command that looks like this;

Get-CsApplicationEndpoint -Filter {OwnerUrn -like "*RGS*"} | Select-Object RegistrarPool -unique

From that command you should get a list of all pools that have RGS applications running.

Posted in 2010, 2013, Microsoft Lync, Power Shell | Tagged , , | Leave a comment