{"id":12946,"date":"2024-01-30T15:15:06","date_gmt":"2024-01-30T14:15:06","guid":{"rendered":"https:\/\/roglacup.com\/klaus62\/?p=12946"},"modified":"2024-01-30T15:15:09","modified_gmt":"2024-01-30T14:15:09","slug":"powershell-sharepoint-tennant-recycle-bin","status":"publish","type":"post","link":"https:\/\/roglacup.com\/klaus62\/2024\/01\/30\/powershell-sharepoint-tennant-recycle-bin\/","title":{"rendered":"Powershell &#038; Sharepoint Tennant Recycle Bin"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p><strong>First Step:<\/strong><\/p>\n\n\n\n<p>Connects to SharePoint using legacy cookie based authentication. Notice this type of authentication is limited in its functionality. We will for instance not be able to acquire an access token for the Graph, and as a result none of the Graph related cmdlets will work. Also some of the functionality of the provisioning engine (Get-PnPSiteTemplate, Get-PnPTenantTemplate, Invoke-PnPSiteTemplate, Invoke-PnPTenantTemplate) will not work because of this reason. The cookies will in general expire within a few days and if you use -UseWebLogin within that time popup window will appear that will disappear immediately, this is expected. Use -ForceAuthentication to reset the authentication cookies and force a new login. See example 10 for a full support for interactive logins using MFA and the ability to acquire Graph tokens.<\/p>\n\n\n\n<p>Connect-PnPOnline -Url &#8220;https:\/\/xxxx.sharepoint.com\/sites\/xxxxx&#8221; -UseWeblogin<\/p>\n\n\n\n<p><strong>Second Step:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/user\/viewprofilepage\/user-id\/7440\">@Dayna Lovelady<\/a>\u00a0After manually deleting the site collection, the site collection will be at Tenant Recycle bin but you willn&#8217;t be able to delete manually. You can use below commandlet to delete it.<\/p>\n\n\n\n<p>Clear-PnPTenantRecycleBinItem -url &#8220;https:\/\/xxxx.sharepoint.com\/sites\/xxxxx&#8221;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Posted from: <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/sharepoint\/reusing-a-deleted-sharepoint-site-name\/m-p\/201148\">https:\/\/techcommunity.microsoft.com\/t5\/sharepoint\/reusing-a-deleted-sharepoint-site-name\/m-p\/201148<\/a><\/p>\n\n\n\n<p>Posted from: <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/sharepoint\/reusing-a-deleted-sharepoint-site-name\/m-p\/201148\">https:\/\/pnp.github.io\/powershell\/cmdlets\/Connect-PnPOnline.html<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>$PSVersionTable<\/strong>    &#8211; check current version <\/p>\n\n\n\n<p>PS C:\\Users\\xxxxxj&gt; $PSVersionTable<\/p>\n\n\n\n<p>Name Value<br>&#8212;- &#8212;&#8211;<br>PSVersion 5.1.22621.2506<br>PSEdition Desktop<br>PSCompatibleVersions {1.0, 2.0, 3.0, 4.0\u2026}<br>BuildVersion 10.0.22621.2506<br>CLRVersion 4.0.30319.42000<br>WSManStackVersion 3.0<br>PSRemotingProtocolVersion 2.3<br>SerializationVersion 1.1.0.1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First Step: Connects to SharePoint using legacy cookie based authentication. Notice this type of authentication is limited in its functionality. We will for instance not be able to acquire an access token for the Graph, and as a result none of the Graph related cmdlets will work. Also some of the functionality of the provisioning&hellip;&nbsp;<a href=\"https:\/\/roglacup.com\/klaus62\/2024\/01\/30\/powershell-sharepoint-tennant-recycle-bin\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Powershell &#038; Sharepoint Tennant Recycle Bin<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":12947,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1603,102],"tags":[],"class_list":["post-12946","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","category-software"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts\/12946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/comments?post=12946"}],"version-history":[{"count":1,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts\/12946\/revisions"}],"predecessor-version":[{"id":12948,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts\/12946\/revisions\/12948"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/media\/12947"}],"wp:attachment":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/media?parent=12946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/categories?post=12946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/tags?post=12946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}