SharePoint PNP Get Sub Sites in Site Collection


The script below will provide you list of sites in Site collection using SharePoint PNP PowerShell

$Creds = Get-Credential
$SiteUrl = "https://tenant.sharepoint.com/sites/sitecollection"
Connect-PnPOnline -Url $SiteUrl -Credentials $Creds
$Site = Get-PnPSite
$Web = Get-PnPWeb

function GetSubWebs($Web, $Context)
{
    $Global:SiteCount++
    $Context.Load($sweb.Webs)
    $Context.ExecuteQuery()
    foreach($aWeb in $sweb.Webs)
    {
        $aWeb.Url
        if($aWeb.Webs.Count > 0)
        {
            GetSubWebs $aWeb $Context
        }
    }
}

$Context= Get-PnPContext
$webs= $Web.Webs
foreach($sweb in $webs)
{
    $Context.Load($sweb)
    $Context.ExecuteQuery()
    $sweb.Url
    GetSubWebs $sweb $Context
}

SharePoint 2010 Workflow Retirement update


SharePoint2010 #Workflow Retirement update with #ModernizationScanner Report for Workflows and full #ApprovalWorkflow from 2010 – 2013 to Power Automate Flow

Please check the video below that provides the initial guidelines on what to do for SharePoint 2010 Workflow that will be disabled later this year. we also tried to provide some insights on how to convert the 2010 workflow to SharePoint 2013 workflow and Power Automate.