Saturday, July 23, 2011

Removing Lync Server 2010 with AD objects.


In one of my clients sites where we have installed Lync Server, it started malfunctioning due to a failed in Front End Service. The reason was assigned certificate not working because of a corruption in the CA. After re installing the CA started working fine, and then we reissued the certificate to the Lync using Deployment wizard. Then the service started finely :) but after few minutes we noticed the users are unable to log into the Lync client, again the service has failed.

Redeploying of the topology also did not help in this situation, the only solution was removing and re installing Lync.
Though the un installation is not that much difficult you have to remove the Active Directory References from ADSIEdit carefully.

Here are the steps to remove

Go to Topology Builder

Open the existing deployment in Topology Builder.
In my environment i had only the Front End server with the mediation server collocated, if you have any server role which is in a separate box you need to uninstall that first likewise remove all the servers except the one you are removing Lync Server on.

Then Right Click the Site.
Under Publish Menu, Choose the "Remove Deployment" option.
This open up the "Remove Deployment Wizard"
The wizard will Remove all the servers from the Topology keeping some necessary Servers.
But it still keep the server in topology which has the Central Configuration Store And Local SQL RTC instance.
After that Publish this topology.

Next go to the Deployment Wizard, this will remove the components which are published above.
Then from "Setup or Remove Lync Server Components" uninstall it.


Then open an elevated command prompt and Change the path to Lync Server Installation.
C:\Program Files\Microsoft Lync server 2010\Server\
Then run the following command - bootstrapper.exe /scorch

After that Remove all the remaining components from the control panel.
Then remove the SQL Server component as well.
Remove the Lync related Active Directory groups.
Finally remove the installation path , C:\Program Files\Microsoft Lync server 2010\Server\

Then the next part is removing AD References
The stale references resides in the RTC Service CN in AD. Under the RTC Service hierarchy you will see specific references to servers and pools in -
Global Settings, Pools, Trusted MCUs, Trusted Services and TrustedWebComponentsServers.
When you expand Global Settings you can see entries, the number of entries will depend on your configuration.

If you expand Global Settings you can see entries, there may be several entries and you could search for the specific server name (Lync Server) that you are looking to remove using LDP.
In run type LDP then you'll get the following window in that type your DC name and say ok.






Then you should bind as your logged on user, select Connection and select Bind, either use the currently logged in user, or specify an account with privileges.





Next Select View>Tree.


If the data is located in your System container you should select DC=domain,DC=com where domain is your domain. If they are stored in configuration you should choose CN=Configuration,DC=Domain,DC=COM



Expand to your RTC Service container where we were viewing before in ADSI Edit


Now we have to search for the records that we have to delete.


If your server is referenced in Global Settings or Trusted Services have to look for msRTCSIP-TrustedServerFQDN

For the filter enter the below part, and replace server fqdn with Lync Server name.

(msRTCSIP-TrustedServerFQDN=SERVERFQDN)




Make sure to select Sub-tree so it searches all trees below for this entry.

Select Run the results should show the specific CNs in the right side of the windows


"Dn: CN={9627e7cf-647d-4634-b83f-08249dd57b39},CN=Global Settings,CN=RTC Service,CN=Services,CN=Configuration,DC=lync,DC=int
canonicalName: lync.int/Configuration/Services/RTC Service/Global Settings/{9627e7cf-647d-4634-b83f-08249dd57b39};
name: {9627e7cf-647d-4634-b83f-08249dd57b39};
objectClass (3): top; container; msRTCSIP-TrustedServer;

Dn: CN={8bd5ff65-6c78-4ba3-8bb6-36f031c9dff7},CN=Trusted Services,CN=RTC Service,CN=Services,CN=Configuration,DC=lync,DC=int
canonicalName: lync.int/Configuration/Services/RTC Service/Trusted Services/{8bd5ff65-6c78-4ba3-8bb6-36f031c9dff7};
name: {8bd5ff65-6c78-4ba3-8bb6-36f031c9dff7};
objectClass (3): top; container; msRTCSIP-TrustedService; "

You have to find the {9627e7cf-647d-4634-b83f-08249dd57b39}, specific ID in ADSIEdit and delete one by one.
Before deleting in ADSIEdit you can right click and go to the properties of the id eg: {9627e7cf-647d-4634-b83f-08249dd57b39}, then you will get the following window
in that you can see the FQDN of LYNC server.



Delete each entry in ADSIEdit.

Trusted MCUs
This is also very similar to Trusted Services, we have to do a LDP query using
"msRTCSIP-TrustedMCUFQDN"
Following the same steps as we did for for Global Settings and Trusted Services and identify the correct key and delete them.

Trusted WebComponentsServers
You have to search using LDP and the attribute
msRTCSIP-TrustedWebComponentsServerFQDN
Do the same procedure as above for this task as well.

Hope you understand the AD objects deleting part, if not please put your comments.
Thanks :)

Monday, May 16, 2011

Outlook proxy settings changing to the server FQDN.


One day i received a call from one of our customer saying that their Outlookanywhere external hostname has been automatically changed to the internal server fqdn (This is a Exchange 2007 CCR environment). If no one has changed the configured settings how come it can happened. Its so weird.

Normally if you have enabled outlookanywhere & RPC over HTTP on the server, placed an external hostname which can resolve from the internet, installed a valid cert and also if you have open port 443 definitely it should work, all these thing were done and it has worked fine for years.
When you change the settings to the external url and after restarting the outlook it automatically changes to the internal server name, after searching for about 2 hours i found the culprit. Here what you can do to solve it.
Some have said that you have to use group policy to force correct setting but that didnot help me.


Get EMS and Run : Get-OutlookProvider -Identity EXPR | FL

check values : CertPrincipalName, Server
If CertPrincipalName is set, it will populate "Only connect to proxy servers that have this principal name in their certificate" field in Outlook, and override the deault value.

To set it run-

Set-OutlookProvider -id EXPR -Server "[servername]" -CertPrincipalName "msstd:server.mydomain.com"
Make sure server.domain.com matches principal name in your certificate.
Also run the following to reset the server value.
Set-OutlookProvider -id EXPR -server $null
chech again with : Get-OutlookProvider -Identity EXPR | FL

Wednesday, March 2, 2011

Exchange 2010 Reporting does not work in SCOM 2007 R2.


Few weeks backs i was doing a installation of SCOM 2007 R2 and then installed the agent to Exchange 2010 and started monitoring, but when i try to genarate a report it was not working. When i try to run the report i got this error.

"An error has occured during report processing.
Query execution failed for dataset 'ServerStatistics'.
For more information about this error navigate to the report server on the local server machine , or enable remote errors"
There was no clue even in the Event Viewer, after researching for about several hours i found the solution.
The reason is DataWarehouseReader account not having the correct permission for the relevant items in the DWDatabase.
As the remedy you can run the following query in the SQL Management Studio

USE [OperationsManagerDW]
GO
GRANT SELECT, EXECUTE ON SCHEMA :: Exchange2010 TO "domain\DWReaderaccont"
GO

Replace OperationsManagerDW with the DB name of yours if you have not changed the default db name while installing SCOM.

Cheerful Monitoring with SCOM :)