如何使用Powershell将企业资源添加到Project Online。运气不佳
添加类型-路径“C:\Users\klkc510\Downloads\DeleteResources\bin\Microsoft.ProjectServer.Client.dll” 添加类型-路径“C:\Users\klkc510\Downloads\DeleteResources\bin\Microsoft.SharePoint.Client.Runtime.dll” 添加类型-路径“C:\Users\klkc510\Downloads\DeleteResources\bin\Microsoft.SharePoint.Client.dll” $pwaPath=“” $projContext=新对象Microsoft.ProjectServer.Client.ProjectContext($pwapath) $UserName=“” $Password=“” $credentials=新对象Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo SecureString$Password-AsPlainText-Force))如何使用Powershell将企业资源添加到Project Online。运气不佳,powershell,csom,Powershell,Csom,添加类型-路径“C:\Users\klkc510\Downloads\DeleteResources\bin\Microsoft.ProjectServer.Client.dll” 添加类型-路径“C:\Users\klkc510\Downloads\DeleteResources\bin\Microsoft.SharePoint.Client.Runtime.dll” 添加类型-路径“C:\Users\klkc510\Downloads\DeleteResources\bin\Microsof
$projContext.Credentials=$Credentials
$projContext.Load($projContext.EnterpriseResources)
$projContext.ExecuteQuery()
$erp = $projContext.EnterpriseResources
$enterprise_resourceid = [Guid]::NewGuid()
$resname = "Test"
$body = {parameters:{'Id:$enterprise_resourceid"",Name:$resname}}
$erp.Add.$body
Write-Host("Deleted Resource: " + $body.Id)
$erp.Update()
$projContext.ExecuteQuery()
$projContext.Load($projContext.EnterpriseResources)