We are developing a workflow solution for Project Server 2019. I am developing a script to automatically deploy the solution. The solution is in a local WSP-file. So far I have the following little script:

$cred = Get-Credential
Connect-PnPOnline -Url https://server/sites/pwa001 -Credentials $cred
Install-PnPSolution -SourceFilePath C:\Dev\WorkflowDev\Workflows.wsp -PackageId $id

The script runs through fine without any errors, but the solution is not being installed on the server. What am I missing?

有帮助吗?

解决方案

I found a solution. In the end it was really simple. After the call to Install-PnPSolution I had to add an Invoke-PnPQuery. So the working script looks like:

$cred = Get-Credential
Connect-PnPOnline -Url https://server/sites/pwa001 -Credentials $cred
Install-PnPSolution -SourceFilePath C:\Dev\WorkflowDev\Workflows.wsp -PackageId $id
Invoke-PnPQuery
许可以下: CC-BY-SA归因
scroll top