onsdag den 19. november 2014

LYNC CLS Bug in Sept14 patch

The LYNC Server core components patch released in sept. introduced a BUG in the centralized loggin service, where loggin simply could not be started - warious blog post and articles describe several ways on how to workaround and/or remove the patch 5.0.8308.803 http://support2.microsoft.com/kb/2992965

BUT finally the issue has been resolved in the most recent core components patch.

Known issues
SymptomsAfter you install this security update on a system that is running Microsoft Lync Server 2013, you find that the Central Logging Service is not listening on designated ports. This causes the Central Logging Service not to start or capture data. When the problem occurs, an exception error message that resembles the following is logged in the event log: Cause 
This problem can occur if you install this security update on Lync Server 2013 before you install the August Update of Lync Server 2013. 

To resolve this issue, install the following cumulative update: 
3003358
(http://support.microsoft.com/kb/3003358/ )
October 2014 Cumulative Update 5.0.8308.831 for Lync Server 2013 core components 


torsdag den 30. oktober 2014

LYNC Server 2013 CU7 October 2014 patches

For details on how to install Build 8308.831 of LYNC Server - see below.
But first of, here is the list of fixes, with links to the relevant articles.


And YAY - the CLS bug introduced in the Aug patch is finally fixed - thank you for that.

Update for Standard or Enterprise Edition server (Front End Servers and Edge Servers)
October 2014 Cumulative Update 5.0.8308.831 for Lync Server 2013 (Front End Server and Edge Server)
Update for Core Components
3003358
October 2014 Cumulative Update 5.0.8308.831 for Lync Server 2013 core components
Issues Fixed:
3003346 Cannot see presence status or send instant messages when OWA is integrated with Lync Server 2013 instant messaging
3003347 User cannot dial out to a PSTN number as a guest in an online meeting in a Lync Server 2013 environment
3003350 Cannot search users by using a keyword that differs from Lync Server 2013 AD DS display name format in a Lync client
3008181 Centralized Logging Service Agent Service cannot start after you install a September 2014 update for Lync Server 2013


Installing the patches.
Please note that if current build is 815 no reboot is required and installation will not break operations.

Enterprise edition do as follows:

Begin by opening a LYNC Management shell and rund the following cmd-let
Get-CsPoolUpgradeReadinessState
It is important that it returns "Ready" - If it returns "busy" then wait 10 minutes and retry. If you see Busy for at least three consecutive times after you wait 10 minutes in between each attempt, or if you see any result of InsufficientActiveFrontEnds for the State value of the pool, there is an issue with the pool.
The Get-CsPoolUpgradeReadinessState cmdlet also returns information about the upgrade domains in the pool, and about which front end servers are in each upgrade domain. If the ReadyforUpgrade value for the upgrade domain that contains the Server that you want to upgrade is True, you can upgrade the server. To do this, you must follow these steps:

Stop new connections to the front end server(s) by using the Stop-CsWindowsServices -Graceful cmdlet.

Run the Cumulative Server Update Installer by using the UI or by using a command to upgrade the front end server(s) associated with an upgrade domain.

NOTE: If you upgrade or update front end servers during scheduled server downtime, you can run the cmdlet in step 2 without the -Graceful parameter. More specifically, run the cmdlet as Stop-CsWindowsService. This action immediately shuts down services, and the server does not wait until each existing service request is fulfilled.


To download the ”lyncserverupdateinstaller.exe” goto
http://www.microsoft.com/en-us/download/confirmation.aspx?id=36820

The GUI clearly indicates which versions are currently installed afor the installed components and which versions will be installed when selecting "Install updates"


 Now continue with the next server.


Lync Server 2013 Standard edition do as follows:


To download the ”lyncserverupdateinstaller.exe” goto
http://www.microsoft.com/enus/download/confirmation.aspx?id=36820
And run the installer.
The GUI clearly indicates which versions are currently installed for the installed components and which versions will be installed when selecting "Install updates"



Backend Database update.
For an easy way to tell if you need database updates, see this article:
http://lyncvoice.blogspot.dk/2014/09/do-i-need-to-update-my-lync-databases.html


After you install the update for the Core Components server role on a Lync Server 2013 Enterprise Edition front end server or on a Lync Server 2013 Standard Edition server, the updated SQL database files are dropped to the computer that has the Core Components server role installed. To apply the database changes, you have to run the applicable cmdlets run the applicable cmdlets that are described in step 2.

Note The -Update parameter is not required when you run the Install-CsDatabase cmdlet to update the Lync Server 2013 databases.


Lync Server 2013 Standard Edition

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SE.FQDN -Verbose



Note You must run the cmdlet on the Lync Server 2013 Standard Edition server.
Lync Server 2013 Enterprise Edition

You must perform several configuration operations, depending on the kind of Lync Server 2013 Enterprise Edition back end servers that you are using.

Note If Persistent Chat is collocated (Persistent Chat front end service and back end database are running on the same server), you must run the following command together with the ExcludeCollocatedStoresparameter.

Note If database mirroring is enabled for your back end databases, we strongly recommended that you use the Invoke-CsDatabaseFailover -NewPrincipal Primary cmdlet and verify that the primary server is principal for all databases before you run the Install-CsDatabase cmdlet.


Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn FEBE.FQDN -Verbose
Lync Server 2013 Enterprise Edition
You must perform several configuration operations, depending on the kind of Lync Server 2013 Enterprise Edition back end servers that you are using.

Note If Persistent Chat is collocated (Persistent Chat front end service and back end database are running on the same server), you must run the following command together with the ExcludeCollocatedStoresparameter.

Note If database mirroring is enabled for your back end databases, we strongly recommended that you use the Invoke-CsDatabaseFailover -NewPrincipal Primary cmdlet and verify that the primary server is principal for all databases before you run the Install-CsDatabase cmdlet.

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn FEBE.FQDN -Verbose




Lync Server 2013 Persistent Chat Databases
When Persistent Chat Services are collocated with the SQL BE Databases, run the following command:


Install-CsDatabase -DatabaseType PersistentChat -SqlServerFqdn PChatBE.fqdn -SqlInstanceName DBInstance -Verbose




Lync Server 2013 Monitoring/Archiving/Persistent Chat Databases
When Lync Server 2013 Monitoring/Archiving/Persistent Chat databases are deployed on stand-alone SQL databases, run the following command:


Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SQLServer.FQDN -Verbose




Step 3: Apply the Central Management Database update

Note You do not have to update the Central Management Database in the following instances:
If the Central Management Store is homed on a Lync Server 2010 Standard Edition Server or Enterprise pool, do not run the Install-CsDatabase -CentralManagementDatabase cmdlets.
If the Central Management Store is homed on a Lync Server 2013 Standard Edition Server or Enterprise pool that was previously updated with the Lync Server 2013 February 2013 cumulative updates.

After the Lync Server 2013 Enterprise Edition front end server or the Lync Server 2013 Standard Edition Server backends are updated, run the following cmdlet to update the Central Management Store:


Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn CMS.FQDN -SqlInstanceName RTC -Verbose


Note In a coexistence environment that contains both Lync Server 2010 and Lync Server 2013 in which the Central Management Service is located on a Lync Server 2010 pool, do not run the Install-CsDatabase -CentralManagementDatabase cmdlet. If you later move the Central Management Service to a Lync Server 2013 pool, you have to run the Install-CsDatabase -CentralManagementDatabase cmdlet to apply the changes.

Step 4: Enable the Mobility service

To enable the Mobility service, run the following cmdlet:
Enable-CsTopology

Step 5: Enable the Unified Communications Web API
 To enable the Unified Communications Web API (UCWA), you must run the Bootstrapper.exe tool again on all Lync Server 2013 Director servers, Standard Edition servers, and Enterprise Edition front end servers on which the web components are installed and updated. The command to run the tool is as follows:


%ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe






Congratulations - you are now done patching you're LYNC environment to the latest level.

onsdag den 1. oktober 2014

Getting rid of those duplicate "Lync contacts" in Outlook

(And everywhere else they sync, for that matter) (Updated 19/102015)

A lot of customers are experiencing the duplicate contacts issue - the issue itself was fixed in this patch http://support2.microsoft.com/kb/2916650

However, patching the LYNC client does not get rid of the duplicate entry's - this has to be done afterwards - and can be a bit of a challenge.
Here are 4 different methods of how to accomplish this task.
Choose what fits, in some cases method 1 will do, and in some cases more extreme measures are needed :)



Method 1:
Sign out of the LYNC client, and wait for a few moments - now switch to outlook and go to "people" and delete the folder "LYNC contacts" don't worry unless you are using UCS, this will not delete your contacts in LYNC, they are stored in your SQL database.

If that fails goto Method 2



Method 2
Log into the light version of OWA by using this link - replace generic address with the correct owa address for your installation

Now go to "contacts" and click manage contacts
Next you select the "Lync Contacts" folder in the drop down and press delete
If this folder is "greyed out" goto Method 3.



Method 3 - the hardcore way.
If the above fails, you will have to script the folder deletion.

Install Exchange EWS managed API - can be downloaded from here
http://www.microsoft.com/en-in/download/details.aspx?id=42951
Can be installed on one of the existing exchange servers, or even on your own client.

Next you open a notepad and paste the following script, remember to change exchange version according to your specific needs, and also please make sure that the path for the API dll is correct.
And most important if you a running other language change the name of the "lync contacts" folder

Save this as deletefolder.ps1


$MailboxName = 'Name@Mailbox'
$dllpath = "D:\EWS\Microsoft.Exchange.WebServices.dll"
[void][Reflection.Assembly]::LoadFile($dllpath)
 $Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
$Service.AutodiscoverUrl($MailboxName,{$true})
$RootFolderID = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Root,$MailboxName)
$RootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($Service,$RootFolderID)
$FolderView = New-Object Microsoft.Exchange.WebServices.Data.FolderView(1000)
$FolderView.Traversal = [Microsoft.Exchange.WebServices.Data.FolderTraversal]::Deep
$Response = $RootFolder.FindFolders($FolderView)
ForEach ($Folder in $Response.Folders) {
   if($folder.DisplayName -eq "Lync contacts") {
     $folder.delete([Microsoft.Exchange.WebServices.Data.DeleteMode]::SoftDelete)
   }
}


You must either run the script as the user owning the mailbox from where you want to delete the folder OR, run the script as a user with full mailbox permissions for the user with the duplicate entrys.
To make sure that the user running the script has the correct permission, try running the below version instead which will enumerate the folders - if you have insufficient permissions, the script will return "Free busy"
By doing this you also can verify the name of the folder in the specific mailbox.

Save this as enumeratefolder.ps1

$MailboxName = 'name@mailbox'
$dllpath = "D:\EWS\Microsoft.Exchange.WebServices.dll"
[void][Reflection.Assembly]::LoadFile($dllpath)
$Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
$Service.AutodiscoverUrl($MailboxName,{$true})
$RootFolderID = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Root,$MailboxName)
$RootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($Service,$RootFolderID)
$FolderView = New-Object Microsoft.Exchange.WebServices.Data.FolderView(1000)
$FolderView.Traversal = [Microsoft.Exchange.WebServices.Data.FolderTraversal]::Deep
$Response = $RootFolder.FindFolders($FolderView)
ForEach ($Folder in $Response.Folders) {
write-host $folder.DisplayName
}

To run either script open powershell and cd to the directory where you have placed the ps1 file and run them.

If the script finishes successfully (and permissions are ok) the folder is deleted and the user can reopen outlook and verify this.

UPDATE: June 2015
A friendly reador of my blog send me a great updated version of the script, where he added the possibility to specify several targets, through an array, aswel as an output - thanks to Nikolaj Pabst for contributing to the community.

Save this as Deletecontactswitharray.ps1
$MailboxList = @(
"user1@domain.com"
, "user2@domain.com"
, "user3@domain.com"
)

$dllpath = "C:\Program Files\Microsoft\Exchange\Web Services\2.2\Microsoft.Exchange.WebServices.dll"
    [void][Reflection.Assembly]::LoadFile($dllpath)
    $Service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
$FoundAmount = 0
$StartTime = Get-Date
Foreach ($MailboxName in $MailboxList)
{
    Write-Host "Handling " $MailboxName
    $Service.AutodiscoverUrl($MailboxName,{$true})
    $RootFolderID = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Root,$MailboxName)
    $RootFolder = [Microsoft.Exchange.WebServices.Data.Folder]::Bind($Service,$RootFolderID)
    $FolderView = New-Object Microsoft.Exchange.WebServices.Data.FolderView(1000)
    $FolderView.Traversal = [Microsoft.Exchange.WebServices.Data.FolderTraversal]::Deep
    $Response = $RootFolder.FindFolders($FolderView)
    $FoundFolder = $FALSE
    ForEach ($Folder in $Response.Folders) {
        if($folder.DisplayName -eq "Lync contacts") {
            $FoundFolder = $TRUE
            ++$FoundAmount
            $folder.delete([Microsoft.Exchange.WebServices.Data.DeleteMode]::SoftDelete)
        }
    }
    if($FoundFolder) {
        Write-Host "Found lync contacts folder!"
    }
    else {
        Write-Host "No lync contacts folder found!"
    }
}
$StopTime = Get-Date
$TimeDiff = New-TimeSpan -Start $StartTime -End $StopTime
Write-Host "Deleted"$FoundAmount "folders in"$TimeDiff



Method 4 (Thanks to Frank Detleff)
MFCAPI
Download MFCAPI http://mfcmapi.codeplex.com/|leo://plh/http%3A*3*3mfcmapi%2Ecodeplex%2Ecom*3/OIu3?_t=tracking_disc  
1. Run MFCMAPI.exe.
2. Click on the Tools menu, and then click Options.
3. Click to enable the following option: Use MDB_ONLINE when calling OpenMsgStore
4. On the Session menu, click Logon.
5. If you are prompted for a profile, select your profile name, and then click OK.
6. In the top pane, locate the line that corresponds to your mailbox, and double-click it.
7. In the navigation pane (left-side pane), expand Root Container then expand Top of Information Store.
8. Expand Contacts, and then find the Lync contacts, right click it, click Delete Folder. Select Hard Deletion then click Ok.
9. Open Outlook client to check if the Lync contacts folder has been deleted.

mandag den 29. september 2014

Do i need to update my LYNC databases ?

After you installed the latest and greatest CU for your LYNC environment - you perhaps wonder, do I need to update my databases ?
Did you do it the last time you installed a CU ?

Well there is an easy way to find out using built-in cmdlets.

To test the centralmanagementdatabase run the following
Test-CsDatabase -CentralManagementDatabase

To test all other databases on the backend SQL run the following
(Remember to run LYNC management Shell as administrator on Standard edition)
Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn "SQLservername.fqdn.com"


The cmdlet will show you the expected version and the installed version, as well as whether or not the database is up-to-date:

Find more info on this cmdlet on TechNet
http://technet.microsoft.com/en-us/library/jj204839.aspx

The database versions sofar can be found in this chart
CU Back End Databases
rtcxds  rtcshared  rtcab rgsconfig   rgsdyn  cpsdyn  LcsLog LcsCDR   QoEMetrics  xds lis mgc mgccomp
RTM 15.13.1 5.0.1 62.42.0 5.5.1 2.2.1 1.1.1 24.40.0 39.82.0 62.90.0 10.13.1 3.1.1 1.42.0 1.7.0
February 2013  15.13.1 5.0.1 62.42.1 5.5.1 2.2.1 1.1.2 24.40.0 39.82.1 62.90.1 10.13.2 3.1.1 1.42.0 1.7.0
July 2013 15.13.1 5.0.1 62.42.2 5.5.1 2.2.1 1.1.2 24.40.0 39.82.2 62.90.1 10.13.2 3.1.1 1.42.1 1.7.0
October 2013 15.13.1 5.0.1 62.42.2 5.5.1 2.2.1 1.1.2 24.40.0 39.82.2 62.90.1 10.13.2 3.1.1 1.42.1 1.7.0
January 2014 15.13.1 5.0.1 62.42.2 5.5.1 2.2.1 1.1.2 24.40.0 39.82.2 62.90.1 10.13.2 3.1.1 1.42.1 1.7.0
August 2014 15.13.1 5.0.1 62.42.3 5.5.1 2.2.1 1.1.2 24.40.0 39.82.2 62.90.1 10.13.2 3.1.1 1.42.2 1.7.0
Sept 2014 15.13.2 5.0.1 62.42.3 5.5.1 2.2.1 1.1.2 24.40.0 39.82.2 62.90.1 10.13.2 3.1.1 1.42.2 1.7.0

 

Speaking @ Microsoft Campus Days 2014

Speaking at Microsoft CampusDays 2014

On November the 25. to 27. The Event "Microsoft Campus Days 2014" will take place at Cinemaxx in Copenhagen.
Here I will give a presentation on LYNC Advanced troubleshooting tools and techniques - together with my colleague Kent Erichsen.

In this session you will get a overview of some of the tools that we as consultants find usefull in troubleshooting failed LYNC environments. But also some of the great tools intended to assist you in choosing the right topology and sizing.

We will talk about builtin tools like Snooper, CLS, MSturnping and so on, but also talking a lot about 3. party tools, that we find usefull. Examples are Wireshark, RUCT, acsyslog.

The session will be demo intense and interactive, so no boring slideshows only a lot of hopefully working demos :)

http://channel9.msdn.com/Events/Microsoft-Campus-Days/Microsoft-Campus-Days-2014/UC40011

CU there.

tirsdag den 26. august 2014

LYNC 2013 CU5 - August patches.



After som confusion about the May 2014 patches being there and gone again, finally the CU5 has been released. And with some major fixes, being the first CU since January.


For details on how to install - see below.
But first of, here is the list of fixes, with links to the relevant articles.

Central Management Server
2912334 Event ID 57006 is logged when you cannot restart the Lync Server 2013 front-end service
Backup Service
2912334 Event ID 57006 is logged when you cannot restart the Lync Server 2013 front-end service
Standard or Enterprise Edition server (Front End Servers and Edge Servers)2976568 Address book delta files are not generated in a Lync Server 2013 Enterprise Edition environment
2967626 Error “creating procedure RtcResetAbAttributes” when you run “Install-CsDatabase” for rtcab database in Lync Server 2013
2967629 Significant bandwidth usage increase by SIP traffic in a Lync Server 2013 environment
2967630 Callee receives a missed call notification after answering a call on an IP telephone in a Lync Server 2013 environment
2979931 Error “I can’t find the meeting with that number” when PSTN user dials in to conference in Lync Server 2013 environment

Unified Communications Managed API 4.0, Core Runtime 64-bit2937311 August 2014 Cumulative Update 5.0.8308.733 for Lync Server 2013, Unified Communications Managed API 4.0 Runtime

Web Components server
2967621 Error 404 when Lync phones sign in to Lync Server 2013 front-end servers during SBS failure recovery
2967631 Error “”DistributionGroupAddress” and “AgentsByUri” must be set.” when you migrate the RG service to Lync Server 2013
This cumulative update also resolves the issues that are previously listed in the following Microsoft Knowledge Base article:
2905040 Description of the cumulative update 5.0.8308.577 for Lync Server 2013, Core Components: January 2014
2881682 Description of the cumulative update 5.0.8308.556 for Lync Server 2013, Core Components: October 2013
2835432 Description of the cumulative update 5.0.8308.420 for Lync Server 2013, Core Components: July 2013
2781550 Description of the cumulative update 5.0.8308.291 for Lync Server 2013, Core Components: February 2013
Core Components2967621 Error 404 when Lync phones sign in to Lync Server 2013 front-end servers during SBS failure recovery
2967631 Error “”DistributionGroupAddress” and “AgentsByUri” must be set.” when you migrate the RG service to Lync Server 2013
This cumulative update also resolves the issues that are previously listed in the following Microsoft Knowledge Base article:
2905040 Description of the cumulative update 5.0.8308.577 for Lync Server 2013, Core Components: January 2014
2881682 Description of the cumulative update 5.0.8308.556 for Lync Server 2013, Core Components: October 2013
2835432 Description of the cumulative update 5.0.8308.420 for Lync Server 2013, Core Components: July 2013
2781550 Description of the cumulative update 5.0.8308.291 for Lync Server 2013, Core Components: February 2013
Administrative Tools2983199 ”Limited functionality is available due to outage” in Lync client when Lync Server 2013 replication queue is full
Web Conferencing server2937314 August 2014 Cumulative Update 5.0.8308.733 for Lync Server 2013, Web Conferencing Server
Windows Fabric2983199 ”Limited functionality is available due to outage” in Lync client when Lync Server 2013 replication queue is full



Installing the patches.




Enterprise edition do as follows:







Begin by opening a LYNC Management shell and rund the following cmd-let
Get-CsPoolUpgradeReadinessState
It is important that it returns "Ready" - If it returns "busy" then wait 10 minutes and retry. If you see Busy for at least three consecutive times after you wait 10 minutes in between each attempt, or if you see any result of InsufficientActiveFrontEnds for the State value of the pool, there is an issue with the pool.





The Get-CsPoolUpgradeReadinessState cmdlet also returns information about the upgrade domains in the pool, and about which front end servers are in each upgrade domain. If the ReadyforUpgrade value for the upgrade domain that contains the Server that you want to upgrade is True, you can upgrade the server. To do this, you must follow these steps:

Stop new connections to the front end server(s) by using the Stop-CsWindowsServices -Graceful cmdlet.

Run the Cumulative Server Update Installer by using the UI or by using a command to upgrade the front end server(s) associated with an upgrade domain.

NOTE: If you upgrade or update front end servers during scheduled server downtime, you can run the cmdlet in step 2 without the -Graceful parameter. More specifically, run the cmdlet as Stop-CsWindowsService. This action immediately shuts down services, and the server does not wait until each existing service request is fulfilled.


To download the ”lyncserverupdateinstaller.exe” goto http://www.microsoft.com/en-us/download/confirmation.aspx?id=36820

The GUI clearly indicates which versions are currently installed afor the installed components and which versions will be installed when selecting "Install updates"


*Note, that version numbers in example picture are NOT current :) CU5 version number is 577


 Now continue with the next server.


Lync Server 2013 Standard edition do as follows:


To download the ”lyncserverupdateinstaller.exe” goto http://www.microsoft.com/enus/download/confirmation.aspx?id=36820
The GUI clearly indicates which versions are currently installed afor the installed components and which versions will be installed when selecting "Install updates"



Backend Database update.


After you install the update for the Core Components server role on a Lync Server 2013 Enterprise Edition front end server or on a Lync Server 2013 Standard Edition server, the updated SQL database files are dropped to the computer that has the Core Components server role installed. To apply the database changes, you have to run the applicable cmdlets run the applicable cmdlets that are described in step 2.

Note The -Update parameter is not required when you run the Install-CsDatabase cmdlet to update the Lync Server 2013 databases.


Lync Server 2013 Standard Edition


Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SE.FQDN -Verbose



Note You must run the cmdlet on the Lync Server 2013 Standard Edition server.
Lync Server 2013 Enterprise Edition

You must perform several configuration operations, depending on the kind of Lync Server 2013 Enterprise Edition back end servers that you are using.

Note If Persistent Chat is collocated (Persistent Chat front end service and back end database are running on the same server), you must run the following command together with the ExcludeCollocatedStoresparameter.

Note If database mirroring is enabled for your back end databases, we strongly recommended that you use the Invoke-CsDatabaseFailover -NewPrincipal Primary cmdlet and verify that the primary server is principal for all databases before you run the Install-CsDatabase cmdlet.


Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn FEBE.FQDN -Verbose

Lync Server 2013 Enterprise Edition

You must perform several configuration operations, depending on the kind of Lync Server 2013 Enterprise Edition back end servers that you are using.

Note If Persistent Chat is collocated (Persistent Chat front end service and back end database are running on the same server), you must run the following command together with the ExcludeCollocatedStoresparameter.

Note If database mirroring is enabled for your back end databases, we strongly recommended that you use the Invoke-CsDatabaseFailover -NewPrincipal Primary cmdlet and verify that the primary server is principal for all databases before you run the Install-CsDatabase cmdlet.

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn FEBE.FQDN -Verbose



Lync Server 2013 Persistent Chat Databases
When Persistent Chat Services are collocated with the SQL BE Databases, run the following command:


Install-CsDatabase -DatabaseType PersistentChat -SqlServerFqdn PChatBE.fqdn -SqlInstanceName DBInstance -Verbose




Lync Server 2013 Monitoring/Archiving/Persistent Chat Databases
When Lync Server 2013 Monitoring/Archiving/Persistent Chat databases are deployed on stand-alone SQL databases, run the following command:


Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn SQLServer.FQDN -Verbose




Step 3: Apply the Central Management Database update

Note You do not have to update the Central Management Database in the following instances:
If the Central Management Store is homed on a Lync Server 2010 Standard Edition Server or Enterprise pool, do not run the Install-CsDatabase -CentralManagementDatabase cmdlets.
If the Central Management Store is homed on a Lync Server 2013 Standard Edition Server or Enterprise pool that was previously updated with the Lync Server 2013 February 2013 cumulative updates.

After the Lync Server 2013 Enterprise Edition front end server or the Lync Server 2013 Standard Edition Server backends are updated, run the following cmdlet to update the Central Management Store:


Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn CMS.FQDN -SqlInstanceName DBInstanceName -Verbose


Note In a coexistence environment that contains both Lync Server 2010 and Lync Server 2013 in which the Central Management Service is located on a Lync Server 2010 pool, do not run the Install-CsDatabase -CentralManagementDatabase cmdlet. If you later move the Central Management Service to a Lync Server 2013 pool, you have to run the Install-CsDatabase -CentralManagementDatabase cmdlet to apply the changes.


Step 4: Enable the Mobility service

To enable the Mobility service, run the following cmdlet:
Enable-CsTopology


Step 5: Enable the Unified Communications Web API
 To enable the Unified Communications Web API (UCWA), you must run the Bootstrapper.exe tool again on all Lync Server 2013 Director servers, Standard Edition servers, and Enterprise Edition front end servers on which the web components are installed and updated. The command to run the tool is as follows:


%ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe





Congratulations - you are now done patching you're LYNC environment to the latest level.









tirsdag den 8. juli 2014

WSUS 2012 Post deployment task failing

After installing Windows Server Update Services Role on a Server 2012. When trying to launch the post deployment tasks from Server Manager, you will find that this fails.
Also if you are trying to deploy the role from PowerShell.


When digging into this issue I found that the post deployment tasks looks for a file called UpdateServices-Services.xml located in Windows\System32\ServerManager\ComponentConfiguration\
When reading through this file it turned out that it is missing a value for "Contentdirectory"
Here is the XML part with the error

<?xml version="1.0" encoding="utf-16"?><INSTANCE CLASSNAME="ServerComponent_UpdateServices_Services"><PROPERTY NAME="ContentDirectory" TYPE="string"></PROPERTY><PROPERTY NAME="ContentLocal" TYPE="boolean"><VALUE>true</VALUE></PROPERTY></INSTANCE>

After correcting the XML and specifying a value post deployment taks finished correctly.

<?xml version="1.0" encoding="utf-16"?><INSTANCE CLASSNAME="ServerComponent_UpdateServices_Services"><PROPERTY NAME="ContentDirectory" TYPE="string"><VALUE>D:\WSUS</VALUE></PROPERTY><PROPERTY NAME="ContentLocal" TYPE="boolean"><VALUE>true</VALUE></PROPERTY></INSTANCE>

HOWEVER - after reproducing the error on a new virtual server I found a more straight forward solution to this. The good news is, that in WSUS v6 (2012 version) There is a utility that can be used to fix this.
The utility is called wsusutil.exe
To correct the post-deployment task error run the utility and specify the folder or instance that you want to use

If using WID:
wsusutil postinstall CONTENT_DIR=D:\WSUS  (Or another folder)
For installations using SQL Server:
wsusutil postinstall CONTENT_DIR=C:\WSUS INSTANCE_NAME=databaseServer[\instanceName]

This util will update the above mentioned XML file, after running this command relauch the post deployment task.
 

fredag den 30. maj 2014

Change Vnet/ Region on VM in Azure - no problem


Sometimes you find yourself in a situation, where you need to change the assigned Region or Vnet on a VM in Azure.
There is a very simple and fast way of achieving this.

By deleting the server, and assigning the same virtual disk to a new VM connected to the correct Vnet.

Go to the Virtual Machine in Azure management portal and Delete the server ! - Important to know that when you delete the VM - it will ask you if you want to keep the virtual disk, then the actual virtual disk will be available even after the VM is deleted.

 
Select Yes, and note the following dialog.
 

 Now you wait 2-3 minutes for the change to replicate, and the you simply click "NEW" and select "From Gallery" click "My Disks" and here you will find the Virtual disk from the deleted server.
On th
On the next screen you will have to create a new "cloud service" in order to select the new VNet or Region - IF you wish to reuse the name for the Cloud Service, the old one has to be deleted prior to creating the "new" VM
 
And thats it, your VM is now connected to the new Vnet og Region.
 

onsdag den 14. maj 2014

Audiocodes T301 timer causing 603 Decline on LYNC

I Recently had a strange issue on a customer site, customer reported they suddenly could not call some clients in Austria. And after digging into the problem we found that also som areas of Sweden and also Italy was impossible to dial via PSTN.
The customers LYNC 2010 server was connected to PSTN via and Audiocodes Mediant 1000 6.2x and the E1 ISDN trunk was working fine for most international and all local numbers.
When turning the LYNC traces the 603 DECLINE response was found.
In the AC syslog tool I found that the carrier send a "CALL RELEASED"
This is what I found in the syslog

pstn send --> PlaceCall: Trunk:0 BChannel:2 ConnID:1 SrcPN=xxxxxxxx SrcSN= DstPN=0043xxxxxxxxxx DstSN= SrcNT=0 SrcNP=0 SrcPres=0 SrcScrn=0 DstNT=0 DstNP=0 ServiceCap=M RdrctNum= RdNT=0 RdNP=0 RdPres=0 RdScrn=0 RdRsn=-1 Excl=1 Display= IE= UUIE=0, RawData:0 CLIRReason:-1 OrigPN= OLI=-1 OffhookInd=0

 pstn recv <-- CALL_PROCEEDING Trunk:0 Conn:1 BChannel:2  callhndl:0 Loc:-1 Des:-1

 pstn recv <-- CALL_RELEASED Trunk:0 Conn:1 RetCause:104 NetCause:16

Now the fun began, because after corresponding with the carrier (TDC) they told me, that the Call_released is send corresponding to the CANCEL that we send them.

So the gateway was sending PSTN commands without showing them in syslog - interesting. Anyway the tech informed me of the error code attached to the CANCEL message was T301 timer error code 102 Recovery on timer expired.
Okay, but the T301 setting In Audiocodes is controlled by the "PSTN alert timeout" setting found under Configuration tab > VoIP menu > PSTN Settings sub-menu > Trunk Settings - and this was set to default at -1 (which according to documentation is 180 seconds - FYI the CANCEL apparently was send after 4 seconds.

I then tried to adjust the PSTN alert timer to 300 and reboot the gateway - and HEY PRESTO - now the customer could dial the customer in Austria with no problems.