Skip to content

docs: clarify PackageScript and PackageProject parameter sets in PowerShell cmdlet help - #2623

Open
MaxonT wants to merge 1 commit into
aws:masterfrom
MaxonT:contrib/1821-auto
Open

MaxonT wants to merge 1 commit into
aws:masterfrom
MaxonT:contrib/1821-auto

Conversation

@MaxonT

@MaxonT MaxonT commented Nov 25, 2026

Copy link
Copy Markdown

The PackageScript and PackageProject parameter sets in the PowerShell tools docs skipped a step you'd need to know already, so the attached patch adds the missing explanation between them.

The comment-based help for New-AWSPowerShellLambdaPackage mentions the script and project workflows but never says that -ScriptPath and -ProjectDirectory belong to different parameter sets, or that -ProjectDirectory needs a folder with a .NET project file. New-AWSPowerShellLambda -Template Basic creates only the script, so the folder it creates cannot be passed to -ProjectDirectory; the packaging step then fails with "No .NET project found in directory ..." (shown in the maintainer's reproduction on the issue).

Changes, help text only, in PowerShell/Module/Public/:

  • New-AWSPowerShellLambdaPackage.ps1: a paragraph in .DESCRIPTION naming the two parameter sets and which parameters go with each; .PARAMETER ProjectDirectory and .PARAMETER ScriptPath say they cannot be combined and that a project folder needs a .NET project file; two examples, script template then -ScriptPath, and -WithProject then -ProjectDirectory.
  • New-AWSPowerShellLambda.ps1: a short paragraph in .DESCRIPTION saying that without -WithProject only the script file (plus a readme.txt) is created and no project file, so it goes to -ScriptPath.

I checked the wording against the param blocks and ParameterSetName attributes in both files and the project file list in the New-AWSPowerShellLambda help.

Not verified: PowerShell (pwsh) is not installed on my machine, so I did not run the cmdlets or render Get-Help; the two new examples are read from the code, not executed. No code or tests changed, and I did not add a change file because the PowerShell module is not listed as a project in .autover/autover.json.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Refs #1821

…rShell cmdlet help

Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
@MaxonT
MaxonT requested review from a team as code owners November 25, 2026 09:42

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant