この1つは、今日のために私を困惑されている...それは半分以上の時間を動作しますが、多くの場合は、executeQuery()コマンドを呼び出すときに私は、このエラーを与える:PowerShellのSharePoint Onlineのは、executeQueryエラー - タイムアウトし
を"0" 引数(複数可)と "のexecuteQuery" を呼び出す例外:
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webURL) $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Credentials.UserName,$Credentials.Password) $web = $ctx.Web $ctx.Load($web) #Retrieve Library $list = $ctx.Web.Lists.GetByTitle($ITPurchaseRequestListName) $ctx.load($list) $files = $list.rootFolder.files $ctx.load($files) $ctx.executeQuery() ########## if((test-path $tempPath) -eq $False) { new-item -itemtype directory -path $temppath } foreach($file in $files) { $ctx.load($file) $ctx.executeQuery() $fileRef = $file.ServerRelativeURL $fileInfo = [Microsoft.SharePoint.Client.File]::OpenBinaryDirect($ctx, $fileRef); $fileName = $tempPath + $file.Name $fileStream = [System.IO.File]::Create($fileName) $fileInfo.Stream.CopyTo($fileStream); $fileStream.Close() start-sleep -seconds 2 }
私はコンソールのSESを殺す場合:
PowerShellを "操作がタイムアウトしました" PowerShellの新しいウィンドウを起動すると、数回実行されてからもう一度起動します。何か案は?