#Config Variables $SiteURL = "https://yourdomain.sharepoint.com/sites/xyzax-version1/" $SourceFilePath ="C:\PnP powershell.txt" $DestinationPath = Import-CSV -path "C:\test.csv" -Header("DestinationPath") #Site Relative Path of the Library #Get Credentials to connect $Cred = Get-Credential #Connect to PnP Online Connect-PnPOnline -Url $SiteURL -Credentials $Cred #powershell pnp to upload file to sharepoint online foreach ($Url in $DestinationPath ) { Add-PnPFile -Path $SourceFilePath -Folder $Url.DestinationPath }