You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4</pre></div></td><tdclass="code"><divclass="codehilite"><pre><span></span><code><spanclass="c"># With the AAD PowerShell **2.0-preview** module</span>
3</pre></div></td><tdclass="code"><divclass="codehilite"><pre><span></span><code><spanclass="c1"># (As there's no CLI command to permanently delete a Group,</span>
395
+
<spanclass="c1"># you'll have to do it through the UI)</span>
<h2id="delete-team-if-necessary">Delete Team (if necessary)</h2>
404
401
<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>
<h2id="delete-site-collection">Delete Site Collection</h2>
416
415
<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
-
<h3id="with-the-sharepointpnppowershellonline-module">With The SharePointPnPPowerShellOnline module</h3>
416
+
<h3id="with-code_1">With code</h3>
418
417
<p>So the solution here is to delete the Site with PowerShell (SharePoint PnP PoweShell module), like this:</p>
419
-
<pre><codeclass="powershell"># If you are familiar with the Get-PnPStoredCredential cmdlet, you can use it here
7</pre></div></td><tdclass="code"><divclass="codehilite"><pre><span></span><code><spanclass="c"># If you are familiar with the Get-PnPStoredCredential cmdlet,</span>
428
+
<spanclass="c"># you can use it here with the "-Credential" Argument</span>
4</pre></div></td><tdclass="code"><divclass="codehilite"><pre><span></span><code><spanclass="c1"># (If it's already in Site Collection Recycle Bin, you'll have to delete it</span>
442
+
<spanclass="c1"># from the UI or through another API like SharePoint or Graph)</span>
431
443
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 <spanclass="s2">"url"</span> --skipRecycleBin --confirm --wait
445
+
</code></pre></div>
446
+
</td></tr></table></div>
447
+
</div>
433
448
<h2id="thats-it">That's it</h2>
434
449
<p>Et voilà ! You can start over your process until it's ready to use.</p>
435
450
<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>
0 commit comments