Skip to content

Commit f350a8e

Browse files
Deployed 8414fec with MkDocs version: 1.0.4
1 parent 4eaebe9 commit f350a8e

File tree

5 files changed

+56
-50
lines changed

5 files changed

+56
-50
lines changed

articles/20200211-properly-remove-team/index.html renamed to articles/20200211-Properly-remove-Team/index.html

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -233,23 +233,23 @@
233233
</li>
234234

235235
<li class="md-nav__item">
236-
<a href="#delete-group-in-azure" class="md-nav__link">
237-
Delete Group in Azure
236+
<a href="#delete-group" class="md-nav__link">
237+
Delete Group
238238
</a>
239239

240240
<nav class="md-nav">
241241
<ul class="md-nav__list">
242242

243243
<li class="md-nav__item">
244-
<a href="#with-interface" class="md-nav__link">
245-
With Interface
244+
<a href="#delete-group-with-interface" class="md-nav__link">
245+
Delete Group with Interface
246246
</a>
247247

248248
</li>
249249

250250
<li class="md-nav__item">
251-
<a href="#with-code" class="md-nav__link">
252-
With code
251+
<a href="#delete-group-with-code" class="md-nav__link">
252+
Delete Group with code
253253
</a>
254254

255255
</li>
@@ -268,15 +268,15 @@
268268
<ul class="md-nav__list">
269269

270270
<li class="md-nav__item">
271-
<a href="#with-interface_1" class="md-nav__link">
272-
With Interface
271+
<a href="#delete-team-with-interface" class="md-nav__link">
272+
Delete Team with Interface
273273
</a>
274274

275275
</li>
276276

277277
<li class="md-nav__item">
278-
<a href="#with-the-teams-powershell-module" class="md-nav__link">
279-
With the Teams PowerShell module
278+
<a href="#delete-team-with-code" class="md-nav__link">
279+
Delete Team with code
280280
</a>
281281

282282
</li>
@@ -295,8 +295,8 @@
295295
<ul class="md-nav__list">
296296

297297
<li class="md-nav__item">
298-
<a href="#with-code_1" class="md-nav__link">
299-
With code
298+
<a href="#delete-site-with-code" class="md-nav__link">
299+
Delete site with code
300300
</a>
301301

302302
</li>
@@ -343,7 +343,7 @@ <h2 id="use-case">Use Case</h2>
343343
<p>You are preparing the process and for mastering it, you have create / test / destroy / retry. But when you want to clean up your mess, you have to know that, during 30 days:</p>
344344
<ul>
345345
<li>Your Team still exists as a Group (you can find it in the "Deleted Groups" menu on AAD), same for the associated e-mail address</li>
346-
<li>The Teams Site also still exists</li>
346+
<li>The Team Site also still exists</li>
347347
</ul>
348348
<p>So let's says that you made a mistake during the creation of a Team and want to "start over" (with same name of course), if you don't want to wait for the Office 365 Job to update your environment and re-create the Team with same name:</p>
349349
<ul>
@@ -356,8 +356,8 @@ <h2 id="use-case">Use Case</h2>
356356
</ul>
357357
<p>Here's a step by step process to delete quickly a Team ! I recommand to follow them in this order to make everything's work.</p>
358358
<h2 id="prerequisites">Prerequisites</h2>
359-
<ul>
360-
<li>An Office 365 (Dev) Tenant</li>
359+
<ol>
360+
<li>An Office 365 (Dev) Tenant or a Partner Demo Tenant</li>
361361
<li>An Account with the following Office 365 roles<ul>
362362
<li>SharePoint Admin</li>
363363
<li>Teams Admin</li>
@@ -367,81 +367,91 @@ <h2 id="prerequisites">Prerequisites</h2>
367367
<li>Groups administrator</li>
368368
</ul>
369369
</li>
370-
<li>PowerShell or Office 365 CLI</li>
370+
<li>Command Interface (one of these)<ul>
371+
<li>PowerShell (with <a href="https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-adv2?view=azureadps-2.0" target="_blank">AzureAD PowerShell</a>, <a href="https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps" target="_blank">PnP PowerShell</a> and <a href="https://docs.microsoft.com/en-us/powershell/teams/?view=teams-ps" target="_blank">Microsoft Teams PowerShell</a>)</li>
372+
<li><a href="https://pnp.github.io/cli-microsoft365/" target="_blank">CLI for Microsoft 365</a></li>
371373
</ul>
372-
<h2 id="delete-group-in-azure">Delete Group in Azure</h2>
373-
<h3 id="with-interface">With Interface</h3>
374+
</li>
375+
</ol>
376+
<h2 id="delete-group">Delete Group</h2>
377+
<h3 id="delete-group-with-interface">Delete Group with Interface</h3>
374378
<p>Throught the UI, you have to delete the Group then permanently delete it</p>
375379
<p><img alt="alt text" src="../../images/articles/20200211/delete-group.png" title="Delete Group" /></p>
376380
<p><img alt="alt text" src="../../images/articles/20200211/perm-delete-group.png" title="Permanently Delete Group" /></p>
377-
<h3 id="with-code">With code</h3>
381+
<h3 id="delete-group-with-code">Delete Group with code</h3>
378382
<div class="superfences-tabs">
379383
<input name="__tabs_1" type="radio" id="__tab_1_0" checked="checked" />
380-
<label for="__tab_1_0">PowerShell</label>
384+
<label for="__tab_1_0">Azure AD PowerShell</label>
381385
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
382386
2
383-
3
384-
4</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="c"># With the AAD PowerShell **2.0-preview** module</span>
385-
<span class="nb">Connect-AzureAD</span> <span class="n">-TenantId</span> <span class="s2">&quot;TenantId&quot;</span>
387+
3</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="nb">Connect-AzureAD</span> <span class="n">-TenantId</span> <span class="s2">&quot;TenantId&quot;</span>
386388
<span class="nb">Remove-AzureADGroup</span> <span class="n">-ObjectId</span> <span class="s2">&quot;GroupId&quot;</span>
387389
<span class="nb">Remove-AzureADMSDeletedDirectoryObject</span> <span class="n">-Id</span> <span class="s2">&quot;GroupId&quot;</span>
388390
</code></pre></div>
389391
</td></tr></table></div>
390392
<input name="__tabs_1" type="radio" id="__tab_1_1" />
391-
<label for="__tab_1_1">Office 365 CLI</label>
393+
<label for="__tab_1_1">CLI for Microsoft 365</label>
392394
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
393395
2
394396
3</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="c1"># (As there&#39;s no CLI command to permanently delete a Group,</span>
395397
<span class="c1"># you&#39;ll have to do it through the UI)</span>
396-
aad o365group remove --id <span class="s2">&quot;groupId&quot;</span> --confirm
398+
aad o365group remove --id <span class="s2">&quot;GroupId&quot;</span> --confirm
397399
</code></pre></div>
398400
</td></tr></table></div>
399401
</div>
400402
<h2 id="delete-team-if-necessary">Delete Team (if necessary)</h2>
401403
<p>Sometimes, once a Group is permanently deleted, the Team still exists. If it's the case and once again, you don't want for the Job to delete it, you can do it yourself. But don't be surprise if the following commands throw an error : maybe the Job has already worked.</p>
402-
<h3 id="with-interface_1">With Interface</h3>
404+
<h3 id="delete-team-with-interface">Delete Team with Interface</h3>
403405
<p>Throught the UI (if you have an owner account) or Admin Interface, you can delete the Team</p>
404406
<p><img alt="alt text" src="../../images/articles/20200211/delete-team-ui.png" title="Delete Team from UI" /></p>
405407
<p><center><strong>OR</strong></center></p>
406408
<p><img alt="alt text" src="../../images/articles/20200211/delete-team-admin.png" title="Delete Team from Admin Interface" /></p>
407-
<h3 id="with-the-teams-powershell-module">With the Teams PowerShell module</h3>
408-
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
409+
<h3 id="delete-team-with-code">Delete Team with code</h3>
410+
<div class="superfences-tabs">
411+
<input name="__tabs_2" type="radio" id="__tab_2_0" checked="checked" />
412+
<label for="__tab_2_0">Microsoft Teams PowerShell</label>
413+
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
409414
2</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="nb">Connect-MicrosoftTeams</span> <span class="n">-TenantId</span> <span class="s2">&quot;TenantId&quot;</span>
410415
<span class="nb">Remove-Team</span> <span class="n">-GroupId</span> <span class="s2">&quot;GroupId&quot;</span>
411416
</code></pre></div>
412-
</td></tr></table>
413-
417+
</td></tr></table></div>
418+
</div>
414419
<h2 id="delete-site-collection">Delete Site Collection</h2>
415420
<p>As I told you before (even if you did the previous steps), if you try to delete the Teams Site from the SharePoint Admin Center, you won't be able to remove it from the Site Collection Recycle Bin (because of the O365 Job Tenant update process).</p>
416-
<h3 id="with-code_1">With code</h3>
417-
<p>So the solution here is to delete the Site with PowerShell (SharePoint PnP PoweShell module), like this:</p>
421+
<h3 id="delete-site-with-code">Delete site with code</h3>
418422
<div class="superfences-tabs">
419-
<input name="__tabs_2" type="radio" id="__tab_2_0" checked="checked" />
420-
<label for="__tab_2_0">PowerShell</label>
423+
<input name="__tabs_3" type="radio" id="__tab_3_0" checked="checked" />
424+
<label for="__tab_3_0">PnP PowerShell</label>
421425
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
422426
2
423427
3
424428
4
425429
5
426430
6
427-
7</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="c"># If you are familiar with the Get-PnPStoredCredential cmdlet,</span>
431+
7
432+
8
433+
9</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="c"># If you are familiar with the Get-PnPStoredCredential cmdlet,</span>
428434
<span class="c"># you can use it here with the &quot;-Credential&quot; Argument</span>
429435
<span class="nb">Connect-PnPOnline</span> <span class="n">-TenantId</span> <span class="s2">&quot;TenantId&quot;</span>
436+
437+
<span class="c"># Remove the site</span>
430438
<span class="nb">Remove-PnPTenantSite</span> <span class="n">-Url</span> <span class="s2">&quot;TeamsSiteUrl&quot;</span> <span class="n">-Force</span> <span class="n">-SkipRecycleBin</span>
431439

432-
<span class="c"># If it&#39;s already in Recycle Bin</span>
440+
<span class="c"># Remove the site from the Site Collection Recycle Bin</span>
433441
<span class="nb">Clear-PnPTenantRecycleBinItem</span> <span class="n">-Url</span> <span class="s2">&quot;TeamsSiteUrl&quot;</span> <span class="n">-Force</span> <span class="n">-Wait</span>
434442
</code></pre></div>
435443
</td></tr></table></div>
436-
<input name="__tabs_2" type="radio" id="__tab_2_1" />
437-
<label for="__tab_2_1">Office 365 CLI</label>
444+
<input name="__tabs_3" type="radio" id="__tab_3_1" />
445+
<label for="__tab_3_1">CLI for Microsoft 365</label>
438446
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
439447
2
440448
3
441-
4</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="c1"># (If it&#39;s already in Site Collection Recycle Bin, you&#39;ll have to delete it</span>
442-
<span class="c1"># from the UI or through another API like SharePoint or Graph)</span>
449+
4
450+
5</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><code><span class="c1"># Remove the site</span>
451+
spo site classic remove -u <span class="s2">&quot;TeamsSiteUrl&quot;</span> --skipRecycleBin --confirm --wait
443452

444-
spo site classic remove -u <span class="s2">&quot;url&quot;</span> --skipRecycleBin --confirm --wait
453+
<span class="c1"># Remove the site from the Site Collection Recycle Bin</span>
454+
spo tenant recyclebinitem remove -u <span class="s2">&quot;TeamsSiteUrl&quot;</span> --confirm --wait
445455
</code></pre></div>
446456
</td></tr></table></div>
447457
</div>
@@ -450,10 +460,6 @@ <h2 id="thats-it">That's it</h2>
450460
<p>Of course, you could also make those tasks with the SharePoint Online Management Shell or with the Graph API, but here I've covered the most common ways of working with Teams / Group / SharePoint administration.</p>
451461
<h2 id="useful-links">Useful Links</h2>
452462
<ul>
453-
<li><a href="https://www.powershellgallery.com/packages/AzureAD/2.0.2.76">AAD PowerShell module</a></li>
454-
<li><a href="https://www.powershellgallery.com/packages/SharePointPnPPowerShellOnline/">SharePointPnPPowerShellOnline module</a></li>
455-
<li><a href="https://www.powershellgallery.com/packages/MicrosoftTeams/">MicrosoftTeams PowerShell module</a></li>
456-
<li><a href="https://pnp.github.io/office365-cli/">Office 365 CLI</a></li>
457463
<li><a href="https://slideplayer.com/slide/13833399/">Microsoft Teams Architecture</a></li>
458464
<li><a href="https://docs.microsoft.com/en-us/microsoftteams/teams-architecture-solutions-posters">Microsoft Teams Architecture Posters</a></li>
459465
</ul>

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ <h1>Home</h1>
292292

293293
<h2 id="articles">Articles</h2>
294294
<ul>
295-
<li><a href="articles/20200211-properly-remove-team/">2020-02-11 : How to quickly and properly delete a Team (without waiting)</a></li>
296295
<li><a href="articles/20201119-connect-to-sharepoint-apppermission-certificate-keyvault/">2020-11-19 : Connect to SharePoint in an AAD Application permission context with a certificate stored in Azure KeyVault</a></li>
296+
<li><a href="articles/20200211-properly-remove-team.md">2020-02-11 : How to quickly and properly delete a Team (without waiting)</a></li>
297297
</ul>
298298
<h2 id="tips-tricks">Tips &amp; Tricks</h2>
299299
<ul>
300-
<li><a href="tips/20200213-csom-test-file-folder-existence/">2020-02-13 : [CSOM] Test in your C# code if a SharePoint File or Folder exists</a></li>
301300
<li><a href="tips/20200505-spfx-progressindicator-to-countdown-timer/">2020-05-05 : [SPFx] Transform the Fluent UI ProgressIndicator component into a countdown timer</a></li>
301+
<li><a href="tips/20200213-csom-test-file-folder-existence/">2020-02-13 : [CSOM] Test in your C# code if a SharePoint File or Folder exists</a></li>
302302
</ul>
303303

304304

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

sitemap.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>None</loc>
5-
<lastmod>2020-11-19</lastmod>
5+
<lastmod>2020-11-27</lastmod>
66
<changefreq>daily</changefreq>
77
</url>
88
<url>
99
<loc>None</loc>
10-
<lastmod>2020-11-19</lastmod>
10+
<lastmod>2020-11-27</lastmod>
1111
<changefreq>daily</changefreq>
1212
</url>
1313
</urlset>

sitemap.xml.gz

1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)