Open
Description
Type of issue
Code doesn't work
Feedback
Via DevOps we run a pipeline that removes existing synapse workspace packages and upload the artifacts that we have in our devops-enviroment. This is done by using the Remove-AzSynapseWorkspacePackage
While using the Remove-AzSynapseWorkspacePackage, an error occurs with the message:
Remove-AzSynapseWorkspacePackage : Array cannot be null.
Parameter name: bytes
This is the code we use:
Write-Host "Updating packages on workspace $($ws.Name)"
$workspacePackages | ForEach-Object { Write-Host " - Package to delete: $($_.Name)" }
$workspacePackages | ForEach-Object {
Write-Verbose -Message "Deleting package: $($_.Name)" -Verbose
Remove-AzSynapseWorkspacePackage -Name $_.Name -WorkspaceName $workspaceName -Force -Verbose
}
We already determined that there are packages that need to be removed. When entering the Remove-AzSynapseWorkspacePackage command, the named packed is still there and not null. During the command the package gets removed, but ends up showing this message.
Information:
PS Version : 5.251.1
Page URL
Content source URL
Author
Document Id
605cf78a-4bdd-6bfb-8066-42af487a213c