One-liner

Just replace the values in $webName, $docLibName, $docFileName and $docCount with the website URL of your existing site, the existing document library you want to populate, the existing document you want to use for all items created, and the number of items you want to add to the document library.

$webName = ""; $docLibName = ""; $docFileName = ""; $docCount = 0; $web = Get-SPWeb -Identity $webName; $docLib = $web.Lists[$docLibName]; $folder = $docLib.RootFolder; $docFileInfo = Get-Item $docFileName; $fileStream = $docFileInfo.OpenRead(); $contents = new-object byte[] $fileStream.Length; $bytesRead = $fileStream.Read($contents, 0, [int]$fileStream.Length); $fileStream.Close(); for ($i = 0; $i -lt $docCount; $i++) { $spFile = $folder.Files.Add($folder.Url + "/" + $i + $docFileInfo.Extension, $contents, $true); $spItem = $spFile.Item; $spItem.Update(); }

Feedback

Let me know if this helps!

Bitnami