diff --git a/powershell/resources/assets/generate-portal-ux.ps1 b/powershell/resources/assets/generate-portal-ux.ps1 index 2ed86b9cd7..8539ac3786 100644 --- a/powershell/resources/assets/generate-portal-ux.ps1 +++ b/powershell/resources/assets/generate-portal-ux.ps1 @@ -32,6 +32,7 @@ $moduleInfo = Get-Module -Name $moduleName $parameterSetsInfo = Get-Module -Name "$moduleName.private" $buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") +$skipParameterList = @("Confirm", "Verbose", "Debug", "ErrorAction", "WarningAction", "InformationAction", "ErrorVariable", "WarningVariable", "InformationVariable", "OutVariable", "OutBuffer", "PipelineVariable", "WhatIf") function Test-FunctionSupported() { @@ -57,7 +58,15 @@ function Test-FunctionSupported() $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) { + if ($skipParameterList -contains $parameterInfo.Name) + { + continue + } $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + if ($category.length -eq 0) + { + return $false + } $invalideCategory = @('Query', 'Body') if ($invalideCategory -contains $category) { @@ -361,4 +370,4 @@ foreach ($resourceType in $resourceTypes.Keys) } $resourceTypeInfo.Remove("provider") $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" -} \ No newline at end of file +}