Collaboration-2-Go


Lösungen und Software-Entwicklung im Collaboration Umfeld, insbesondere Microsoft SharePoint, Microsoft Exchange und Microsoft Office.

Support


Mobil: +49 (152) 53 97 78 79
Mail: service@collaboration-2-go.de
Weitere Kontaktmöglichkeiten: Kontaktseite
Dekoration: Köln



Upload Document to a SharePoint Library
Created: 15.03.2015
Categories: PowerShell; SharePoint 2013

Upload Document to a SharePoint Library:


$destinationUrl = "https://sharepoint/sites/teamsite/documents"
$file = get-childitem "e:\tmp\document.txt"

$webclient = New-Object System.Net.WebClient
$webclient.UseDefaultCredentials = $true
$webclient.UploadFile($destinationUrl + "/" + $file.Name, "PUT", $file.FullName)


In case you don't want to use integrated security you have to set the credentials.
    

Post a Comment!