Tweak help formatting script to be more StrictMode tolerant (#10563)

This commit is contained in:
Dan Thompson
2019-10-03 17:18:58 -07:00
committed by Aditya Patwardhan
parent d7458c45b2
commit 5a236f7d2f
@@ -139,7 +139,8 @@ if (($_.relatedLinks -ne $()) -and ($_.relatedLinks.navigationLink -ne $()) -and
var MamlParameterControl = CustomControl.Create()
.StartEntry()
.AddScriptBlockExpressionBinding(
@"$optional = $_.required -ne 'true'
@"Set-StrictMode -Off
$optional = $_.required -ne 'true'
$positional = (($_.position -ne $()) -and ($_.position -ne '') -and ($_.position -notmatch 'named') -and ([int]$_.position -ne $()))
$parameterValue = if ($null -ne $_.psobject.Members['ParameterValueGroup']) {
"" {$($_.ParameterValueGroup.ParameterValue -join ' | ')}""