$spAssignment = Start-SPAssignment $spWeb = Get-SPWeb http://SPServer01 -AssignmentCollection $spAssignment $spDocumentLibrary = $spWeb.GetList("http://spserver01/Shared%20Documents/Forms/AllItems.aspx") $spDocumentLibrary.Fields.Add("Location","Text",$False) $spDocumentLibrary.Fields.Add("Year","Text",$False) $spFolder = $spWeb.GetFolder("Shared Documents") $spFolder.Files.Add("Shared Documents/PowerShellDocument.docx",(Get-ChildItem "C:\Demo\Documents\My WordDocument.docx").OpenRead()) $spListItemCollection = $spWeb.Lists["Shared Documents"].GetItems() $spListItem = $spListItemCollection | Where { $_.Name -eq "PowerShellDocument.docx" } $spListItem["Title"] = "PowerShellDocument.docx" $spListItem["Year"] = "2010" $spListItem["Location"] = "Wellington" $spListItem.Update() Stop-SPAssignment $spAssignment Get-ChildItem C:\Demo\Documents\Wellington Get-ChildItem C:\Demo\Documents\Wellington | Select-Object FullName, CreationTime Get-ChildItem C:\Demo\Documents\Wellington | Select-Object FullName, @{Name="Year";Expression={($_.CreationTime).Year}}, @{Name="Location";Expression={"Wellington"}} & C:\Demo\Upload-LotsOfDocuments.ps1 .\CheckOut-SPFile.ps1 -url http://SPServer01 -folder "Shared Documents" -CheckoutType Online -all .\CheckIn-SPFile.ps1 -url http://SPServer01 -folder "Shared Documents" -comment "Checked in by Administrator" -checkinType Minor -all