posts
Counting Files and folders within SharePoint Libraries using PnP PowerShell
Counting Files and Folders within SharePoint Libraries using PnP PowerShell This post shows a PowerShell script using PnP PowerShell module to count the number of files and folders within a SharePoint library. It might be useful doing an inventory of file count.
$SiteURL = "Counting Files within a SharePoint Library using PnP PowerShell" # Generate a unique log file name using today's date $dateTime = (Get-Date).toString("dd-MM-yyyy") $invocation = (Get-Variable MyInvocation).Value $directorypath = Split-Path $invocation.
posts
Resolving the 'PnP PowerShell Not Digitally Signed' Issue
Resolving the ‘PnP PowerShell Not Digitally Signed’ Issue If you’ve recently upgraded PnP PowerShell to the latest nightly build and are encountering errors when trying to execute any PnP PowerShell cmdlets, this guide is for you.
PS C:\Users\RAuckloo> connect-pnponline -url https://contoso-admin.sharepoint.com -Interactive connect-pnponline: The 'connect-pnponline' command was found in the module 'PnP. PowerShell', but the module could not be loaded due to the following error: [Errors occurred while loading the format data file: \\contoso-it.
posts
Retrieving File Count and Size of a folder using PnP PowerShell
Retrieving File Count and Size of a folder within a SharePoint Library using PnP PowerShell This post covers a PowerShell script that uses the PnP PowerShell module to retrieve the file count and total size of a specific folder within a SharePoint library.
#Parameters $SiteURL = "https://contoso.sharepoint.com/sites/company311" $FolderSiteRelativeURL = "Shared Documents/Test1" #Connect to PnP Online Connect-PnPOnline -Url $SiteURL -Interactive #Get the folder $Folder = Get-PnPFolder -Url $FolderSiteRelativeURL -Includes ListItemAllFields #Get the total Size of the folder - with versions Write-host "Size of the Folder:" $([Math]::Round(($Folder.