you have to fist check out file
foreach ($file in $files) {
$file.CheckOut()
$stream = $file.OpenRead()
$done = $list.RootFolder.SubFolders["Hertel"].Files.Add($file.Name, $stream, $true)
Write-Host $done.Name "Uploaded" -BackgroundColor Green
}
No comments:
Post a Comment