Question

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?

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top