Deleting Old Skype for Business or Lync server from ADSI

&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2524 " id&equals;"quads-ad2524" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;<h1 align&equals;"left">The story<&sol;h1>&NewLine;<p>I had a project few weeks ago where my client wanted to install Skype for Business 2019 but had installed Lync before and removed the server without doing proper decommissioning which kept dirty records in AD database and had to be removed manually in order to make a new clean installation of Skype for Business 2019<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2528 " id&equals;"quads-ad2528" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2522 " id&equals;"quads-ad2522" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2530 " id&equals;"quads-ad2530" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<h1>To do so&colon;<&sol;h1>&NewLine;<p>There are two days of doing so&comma; One is using ADSIEdit and ADUC to remove Computer Objects and Users related attributes and Security Groups&period;<&sol;p>&NewLine;<p>I normally would prefer PowerShell but since we can demonstrate both ways for people who like to work with GUI<&sol;p>&NewLine;<h1>Starting with GUI<&sol;h1>&NewLine;<p>Removing Legacy Lync server from the AD Schema<&sol;p>&NewLine;<h1>Prerequisites<&sol;h1>&NewLine;<ol>&NewLine;<li>Using a domain or enterprise admin<&sol;li>&NewLine;<li>Access to the ADSIEdit&period;<&sol;li>&NewLine;<&sol;ol>&NewLine;<p>Goal of removing Legacy Lync server from your AD environment&period;<&sol;p>&NewLine;<ol>&NewLine;<li>Preparing AD schema and domain for a new deployment after you improperly deleted Lync Servers without uninstalling them&period;<&sol;li>&NewLine;<li>Cleaning Users&&num;8217&semi; Lync related attributes for the new deployment&period;<&sol;li>&NewLine;<&sol;ol>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image001-1&period;png"><img width&equals;"1229" height&equals;"479" title&equals;"clip&lowbar;image001" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image001" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image001&lowbar;thumb-1&period;png" border&equals;"0"><&sol;a> &NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2523 " id&equals;"quads-ad2523" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; &NewLine;<&sol;p>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image002&period;png"><img width&equals;"1305" height&equals;"467" title&equals;"clip&lowbar;image002" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image002" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image002&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<h1>Step&num;1&colon; Remove permissions<&sol;h1>&NewLine;<p>This step removes the original Lync permissions from the active director&period;<&sol;p>&NewLine;<ol>&NewLine;<li>Open Active Directory Users and Computers<&sol;li>&NewLine;<li>Right click on your top level domain being cleaned and select Properties<&sol;li>&NewLine;<li>From the Properties windows&comma; select the Security tab&period;<&sol;li>&NewLine;<li>Remove all security users titled RTC&ast;<br &sol;>&NewLine;These are usually<br &sol;>&NewLine;&&num;8211&semi; RTCUniversalServerReadOnlyGroup<br &sol;>&NewLine;&&num;8211&semi; RTCUniversalUserReadOnlyGroup<br &sol;>&NewLine;&&num;8211&semi; RTCUniversalUniversalServices<br &sol;>&NewLine;&&num;8211&semi; RTCUniversalUserAdmins<&sol;li>&NewLine;<&sol;ol>&NewLine;<p><cite>From &lt&semi;<a href&equals;"http&colon;&sol;&sol;blog&period;armgasys&period;com&sol;&quest;p&equals;320">http&colon;&sol;&sol;blog&period;armgasys&period;com&sol;&quest;p&equals;320<&sol;a>&gt&semi; <&sol;cite><&sol;p>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image003&period;png"><img width&equals;"263" height&equals;"346" title&equals;"clip&lowbar;image003" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image003" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image003&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image004&period;png"><img width&equals;"392" height&equals;"440" title&equals;"clip&lowbar;image004" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image004" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image004&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<ol>&NewLine;<li>&NewLine;<h1>Repeat the same steps for each of the following AD Folders and<&sol;h1>&NewLine;<p>OUs<br &sol;>&NewLine;NOTE&colon; Not all RTC permissions will exist in each AD Folder or OU&comma; but these three OUs do&colon;<br &sol;>&NewLine;&&num;8211&semi; Domain Controllers<br &sol;>&NewLine;&&num;8211&semi; System<br &sol;>&NewLine;&&num;8211&semi; Users<&sol;li>&NewLine;<&sol;ol>&NewLine;<h2>Domain Controllers<&sol;h2>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image005&period;png"><img width&equals;"491" height&equals;"469" title&equals;"clip&lowbar;image005" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image005" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image005&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<h2>Systems<&sol;h2>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image006&period;png"><img width&equals;"441" height&equals;"413" title&equals;"clip&lowbar;image006" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image006" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image006&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2531 " id&equals;"quads-ad2531" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<h2>Users<&sol;h2>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image007&period;png"><img width&equals;"430" height&equals;"368" title&equals;"clip&lowbar;image007" style&equals;"display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image007" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image007&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<p>Step&num;3&colon; Additional AD cleanup<&sol;p>&NewLine;<ol>&NewLine;<li>Open Active Directory Users and Computers<&sol;li>&NewLine;<li>Drill down as follows<br &sol;>&NewLine;&lbrack;Your Domain&rsqb; &bsol; Program Data &bsol; Distributed &bsol; KeyMan<&sol;li>&NewLine;<li>Delete LyncCertificates<br &sol;>&NewLine;NOTE&colon; This may not exist in all scenarios&period;<&sol;li>&NewLine;<li>Drill down as follows<br &sol;>&NewLine;&lbrack;Your Domain&rsqb; Users<&sol;li>&NewLine;<li>Delete all RTC&ast; and CS&ast; users created by Lync<br &sol;>&NewLine;I&period;E&period; CSAdministrator&comma; CSHelpDesk&comma; RTCComponentUniversalServices&comma; Etc&period;<&sol;li>&NewLine;<&sol;ol>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;image-1&period;png"><img width&equals;"766" height&equals;"624" title&equals;"image" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"image" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;image&lowbar;thumb-1&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<p>Deleting users from the User OU<&sol;p>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image0016-1&period;png"><img width&equals;"933" height&equals;"229" title&equals;"clip&lowbar;image001&lbrack;6&rsqb;" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image001&lbrack;6&rsqb;" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image0016&lowbar;thumb-1&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<p>Deleting CS Users<&sol;p>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image0024&period;png"><img width&equals;"932" height&equals;"461" title&equals;"clip&lowbar;image002&lbrack;4&rsqb;" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image002&lbrack;4&rsqb;" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image0024&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<p>Step&num;4&colon; Cleanup existing users<&sol;p>&NewLine;<p>This steps resets Lync attributes for any domain users and contacts&period;<&sol;p>&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;image-2&period;png"><img width&equals;"712" height&equals;"570" title&equals;"image" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"image" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;image&lowbar;thumb-2&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;<h1>The Second way&colon; Using PowerShell<&sol;h1>&NewLine;<p>get-aduser -filter &lbrace;msRTCSIP-PrimaryUserAddress -like &&num;8220&semi;&ast;&&num;8221&semi;&rcub;&vert;set-aduser -clear msRTCSIP-PrimaryUserAddress&comma;msRTCSIP-PrimaryHomeServer&comma;msRTCSIP-UserEnabled&comma;msRTCSIP-OptionFlags&comma;msRTCSIP-UserPolicies&comma; msRTCSIP-DeploymentLocator&comma; msRTCSIP-FederationEnabled&comma; msRTCSIP-InternetAccessEnabled<&sol;p>&NewLine;<h1>Result&colon;<&sol;h1>&NewLine;<p>Users attribute are clean and AD has nothing left over of Previous installation of Lync or Skype for Business &period;<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2529 " id&equals;"quads-ad2529" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<p><a href&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image0018&period;png"><img width&equals;"413" height&equals;"454" title&equals;"clip&lowbar;image001&lbrack;8&rsqb;" style&equals;"margin&colon; 0px&semi; display&colon; inline&semi; background-image&colon; none&semi;" alt&equals;"clip&lowbar;image001&lbrack;8&rsqb;" src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2019&sol;12&sol;clip&lowbar;image0018&lowbar;thumb&period;png" border&equals;"0"><&sol;a><&sol;p>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2527 " id&equals;"quads-ad2527" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;

moh10ly

Recent Posts

Reset passwords for Active Directory Users

Reset and manage your Active Directory users' Passwords Active Directory is one of the most…

3 years ago

Finding Exchange Database hidden mailboxes. ​

Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…

3 years ago

Setting up ADConnect and PTA (Password auth through) servers agents behind proxy

If you're using a Proxy server in your firewall or in your network and have…

3 years ago

Get Report of Active Directory Locked Accounts and Machine they logged in from

Story:I got some clients  that have reported some of their users being locked out and…

3 years ago

Checking and Providing Full and SendAs delegate access on O365 Exchange Online

Delegate Permissions This is a code that I have wrote recently to check if an…

3 years ago

Retrieving attachments from Exchange mailbox using python

Story: I got a request from a client who constantly gets CVs and have to…

4 years ago

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298