Empty all first and second stage SharePoint Online recycle bins

This script will get all the site collections in SharePoint Online and empty the recycle bins.

# Empty All First and Second stage Recycle Bins
# Connect to Admin Center
Connect-PnPOnline -Url https://<tenantName>-admin.sharepoint.com/ -SPOManagementShell
$Credential = Get-Credential
# Get All Site collections - Exclude: Seach Center, Redirect site, Mysite Host, App Catalog, Content Type Hub, eDiscovery and Bot Sites
$SiteCollections = Get-PnPTenantSite | Where-Object -Property Template -NotIn ("SRCHCEN#0", "REDIRECTSITE#0", "SPSMSITEHOST#0", "APPCATALOG#0", "POINTPUBLISHINGHUB#0", "EDISC#0", "STS#-1")
# Loop through each site collection
foreach($Site in $SiteCollections) {
    #Get the storage Quota of the site
    $SiteURL =  $Site.URL
    Write-Output "$(Get-Date) Processing $($SiteURL)"
    # Connect to PnP Online
    Connect-PnPOnline -URL $SiteURL -Credentials $Credential
    Get-PnPRecycleBinItem | Clear-PnpRecycleBinItem -Force
}