Remove Lync 2010 system from AD (with orphaned servers)

1., Remove the following Groups from Active Directory :

CSAdministrator
CSArchivingAdministrator
CSHelpDesk
CSLocationAdministrator
CSResponseGroupAdministrator
CSServerAdministrator
CSUserAdministrator
CSViewOnlyAdministrator
CSVoiceAdministrator
RTCComponentUniversalServices
RTCHSUniversalServices
RTCProxyUniversalServices
RTCSBAUniversalServices
RTCUniversalConfigReplicator
RTCUniversalGlobalReadOnlyGroup
RTCUniversalGlobalWriteGroup
RTCUniversalReadOnlyAdmins
RTCUniversalSBATechnicians
RTCUniversalServerAdmins
RTCUniversalServerReadOnlyGroup
RTCUniversalUserAdmins
RTCUniversalUserReadOnlyGroup

2., Run ADSIEDIT and connect to the Configuration naming context.  Browse down to Configuration -> Services -> RTC Service and then delete the entire RTC Service container.

3., Also delete the Computer object(s) for any Lync Server you had previously installed.

(Un)install Lync 2010 error: The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)

Error text:

Executing PowerShell command: Enable-CSComputer -Confirm:$false -Verbose -Report “C:\Users\___\AppData\Local\Temp\2\Enable-CSComputer-[2012_12_21][12_40_50].html”
Command execution failed: The object identifier does not represent a valid object. (Exception from HRESULT: 0x800710D8)

Solution:

Any other IIS websites on this server?

Enter IIS management console, set default webserver port to something different than 80, then restart IIS, then try setup again.

If not need server or website, simply delete.

How to purge a SQL Server 2008 database transaction log file ?

TRUNCATE_ONLY switch instead:

USE adatbazisnev
GO
DECLARE @SqlStatement as nvarchar(max)
DECLARE @LogFileLogicalName as sysname
SET @SqlStatement = 'ALTER DATABASE ' + DB_NAME() + ' SET RECOVERY SIMPLE'
EXEC ( @SqlStatement )
SELECT [name], [recovery_model_desc] FROM sys.databases WHERE [name] = DB_NAME()
SELECT @LogFileLogicalName = [Name] FROM sys.database_files WHERE type = 1
DBCC Shrinkfile(@LogFileLogicalName, 1)
SET @SqlStatement = 'ALTER DATABASE ' + DB_NAME() + ' SET RECOVERY FULL'
EXEC ( @SqlStatement )
SET @SqlStatement = 'SELECT [name], [recovery_model_desc] FROM ' + DB_NAME() + '.sys.databases WHERE [name] = ''' + DB_NAME() + ''''
EXEC ( @SqlStatement )