VSTS Release error: A parameter cannot be found that matches parameter name 'Server'
Changing the name of the argument fixed the issue. My script now contains:
Param(
# [snip]
[string] [Parameter(Mandatory=$true)] $ServerName
)
And I pass the arguments as:
-ServerName '$(ServerName)' [snip]
As for the why, I can only speculate. I checked the source code but couldn't find anything obvious. My only guess is that the Azure PowerShell task overwrote $Server
for some reason (though I'm not sure why the log output would show the correct argument in that case).