Adopt consistent PowerShell coding patterns to improve correctness and readability, and keep project definitions clean.
-EnableSystemAssignedIdentity $true) over switch-like :$true.$false to a boolean parameter in PowerShell test scripts, use the idiomatic -EnableSystemAssignedIdentity:$false form.$PSBoundParameters, don’t re-specify it as a separate named argument.
Test-AzNameAvailability -Type Site @PSBoundParametersTest-AzNameAvailability -Name $Name -Type Site @PSBoundParameters: in a double-quoted string, escape the : so the variable name is parsed correctly.
throw "Failed: #$prNumber`: $($_)"<ItemGroup> entries or SDK imports) that are not used by any code—remove or justify them.Apply these checks during review to catch subtle correctness issues (argument binding and interpolation) and to keep scripts/projects maintainable.