Skip to content

Commit ec77413

Browse files
committed
Deployed 43b465d with MkDocs version: 1.0.4
1 parent 3b35a83 commit ec77413

File tree

6 files changed

+307
-177
lines changed

6 files changed

+307
-177
lines changed

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

Lines changed: 61 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,8 @@
248248
</li>
249249

250250
<li class="md-nav__item">
251-
<a href="#with-the-azure-active-directory-aad-powershell-module" class="md-nav__link">
252-
With the Azure Active Directory (AAD) PowerShell module
253-
</a>
254-
255-
</li>
256-
257-
<li class="md-nav__item">
258-
<a href="#with-office-365-cli" class="md-nav__link">
259-
With Office 365 CLI
251+
<a href="#with-code" class="md-nav__link">
252+
With code
260253
</a>
261254

262255
</li>
@@ -302,15 +295,8 @@
302295
<ul class="md-nav__list">
303296

304297
<li class="md-nav__item">
305-
<a href="#with-the-sharepointpnppowershellonline-module" class="md-nav__link">
306-
With The SharePointPnPPowerShellOnline module
307-
</a>
308-
309-
</li>
310-
311-
<li class="md-nav__item">
312-
<a href="#with-office-365-cli_1" class="md-nav__link">
313-
With Office 365 CLI
298+
<a href="#with-code_1" class="md-nav__link">
299+
With code
314300
</a>
315301

316302
</li>
@@ -388,18 +374,29 @@ <h3 id="with-interface">With Interface</h3>
388374
<p>Throught the UI, you have to delete the Group then permanently delete it</p>
389375
<p><img alt="alt text" src="../../images/articles/20200211/delete-group.png" title="Delete Group" /></p>
390376
<p><img alt="alt text" src="../../images/articles/20200211/perm-delete-group.png" title="Permanently Delete Group" /></p>
391-
<h3 id="with-the-azure-active-directory-aad-powershell-module">With the Azure Active Directory (AAD) PowerShell module</h3>
392-
<p>With the AAD PowerShell <strong>2.0-preview</strong> module, use the following commands</p>
393-
<pre><code class="powershell">Connect-AzureAD -TenantId &quot;TenantId&quot;
394-
Remove-AzureADGroup -ObjectId &quot;GroupId&quot;
395-
Remove-AzureADMSDeletedDirectoryObject -Id &quot;GroupId&quot;
396-
</code></pre>
397-
398-
<h3 id="with-office-365-cli">With Office 365 CLI</h3>
399-
<pre><code class="cli">aad o365group remove --id &quot;groupId&quot; --confirm
400-
</code></pre>
401-
402-
<p>(As there's no CLI command to permanently delete a Group, you'll have to do it through the UI)</p>
377+
<h3 id="with-code">With code</h3>
378+
<div class="superfences-tabs">
379+
<input name="__tabs_1" type="radio" id="__tab_1_0" checked="checked" />
380+
<label for="__tab_1_0">PowerShell</label>
381+
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
382+
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>
386+
<span class="nb">Remove-AzureADGroup</span> <span class="n">-ObjectId</span> <span class="s2">&quot;GroupId&quot;</span>
387+
<span class="nb">Remove-AzureADMSDeletedDirectoryObject</span> <span class="n">-Id</span> <span class="s2">&quot;GroupId&quot;</span>
388+
</code></pre></div>
389+
</td></tr></table></div>
390+
<input name="__tabs_1" type="radio" id="__tab_1_1" />
391+
<label for="__tab_1_1">Office 365 CLI</label>
392+
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
393+
2
394+
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>
395+
<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
397+
</code></pre></div>
398+
</td></tr></table></div>
399+
</div>
403400
<h2 id="delete-team-if-necessary">Delete Team (if necessary)</h2>
404401
<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>
405402
<h3 id="with-interface_1">With Interface</h3>
@@ -408,28 +405,46 @@ <h3 id="with-interface_1">With Interface</h3>
408405
<p><center><strong>OR</strong></center></p>
409406
<p><img alt="alt text" src="../../images/articles/20200211/delete-team-admin.png" title="Delete Team from Admin Interface" /></p>
410407
<h3 id="with-the-teams-powershell-module">With the Teams PowerShell module</h3>
411-
<pre><code class="powershell">Connect-MicrosoftTeams -TenantId &quot;TenantId&quot;
412-
Remove-Team -GroupId &quot;GroupId&quot;
413-
</code></pre>
408+
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
409+
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>
410+
<span class="nb">Remove-Team</span> <span class="n">-GroupId</span> <span class="s2">&quot;GroupId&quot;</span>
411+
</code></pre></div>
412+
</td></tr></table>
414413

415414
<h2 id="delete-site-collection">Delete Site Collection</h2>
416415
<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>
417-
<h3 id="with-the-sharepointpnppowershellonline-module">With The SharePointPnPPowerShellOnline module</h3>
416+
<h3 id="with-code_1">With code</h3>
418417
<p>So the solution here is to delete the Site with PowerShell (SharePoint PnP PoweShell module), like this:</p>
419-
<pre><code class="powershell"># If you are familiar with the Get-PnPStoredCredential cmdlet, you can use it here
420-
# With the &quot;-Credential&quot; Argument
421-
Connect-PnPOnline -TenantId &quot;TenantId&quot;
422-
Remove-PnPTenantSite -Url &quot;TeamsSiteUrl&quot; -Force -SkipRecycleBin
423-
424-
# If it's already in Recycle Bin
425-
Clear-PnPTenantRecycleBinItem -Url &quot;TeamsSiteUrl&quot; -Force -Wait
426-
</code></pre>
418+
<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>
421+
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
422+
2
423+
3
424+
4
425+
5
426+
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>
428+
<span class="c"># you can use it here with the &quot;-Credential&quot; Argument</span>
429+
<span class="nb">Connect-PnPOnline</span> <span class="n">-TenantId</span> <span class="s2">&quot;TenantId&quot;</span>
430+
<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>
427431

428-
<h3 id="with-office-365-cli_1">With Office 365 CLI</h3>
429-
<pre><code class="cli">spo site classic remove -u &quot;url&quot; --skipRecycleBin --confirm --wait
430-
</code></pre>
432+
<span class="c"># If it&#39;s already in Recycle Bin</span>
433+
<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>
434+
</code></pre></div>
435+
</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>
438+
<div class="superfences-content"><table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
439+
2
440+
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>
431443

432-
<p>(If it's already in Site Collection Recycle Bin, you'll have to delete it from the UI or through another API like SharePoint or Graph)</p>
444+
spo site classic remove -u <span class="s2">&quot;url&quot;</span> --skipRecycleBin --confirm --wait
445+
</code></pre></div>
446+
</td></tr></table></div>
447+
</div>
433448
<h2 id="thats-it">That's it</h2>
434449
<p>Et voilà ! You can start over your process until it's ready to use.</p>
435450
<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>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <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>
295+
<li><a href="articles/20200211-properly-remove-team/">2020-02-11 : How to quickly and properly delete a Team (without waiting)</a></li>
296296
</ul>
297297
<h2 id="tips-tricks">Tips &amp; Tricks</h2>
298298
<ul>

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-02-14</lastmod>
5+
<lastmod>2020-02-17</lastmod>
66
<changefreq>daily</changefreq>
77
</url>
88
<url>
99
<loc>None</loc>
10-
<lastmod>2020-02-14</lastmod>
10+
<lastmod>2020-02-17</lastmod>
1111
<changefreq>daily</changefreq>
1212
</url>
1313
</urlset>

sitemap.xml.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)