How to restore subsite in a Sharepoint online site collection using Pnp Powershell

Hello SharePointers,

Below are the power shell commands to restore subsite in a SharePoint online site collection using Pnp Powershell.

  
$URL="https://yourcompany.sharepoint.com/sites/selfservice/"  
$title=" KDM Monitor" 
$credentials=Get-Credential 
    
# Connect to SharePoint Online   
Connect-PnPOnline -Url $URL -Credentials $credentials  
  
Get-PnPRecycleBinItem | ? Title -eq $title | Restore-PnPRecycleBinItem  

Happy SharePointing 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *