PowerShell / PowerShell/PSResourceGet

Should have cmdlet to verify cmdlets in a given script

Open
#924 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature_request Issue-Discussion
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Summary of the new feature / enhancement

Maybe call it Resolve-Dependency which takes a path to a ps1 (or psm1), uses PowerShell to parse to AST extracting all the commands and seeing if they are actually available on the current system.

If it's a cmdlet and not on the system, discover which module via PowerShellGet to install for that cmdlet or if a native command, just give a warning message that it wasn't found on the system. For security, make it clear if the module is from an untrusted repository.

Proposed technical implementation details (optional)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed Resolve-Dependency behavior and the AST extraction example in Codex.psm1 at the linked line. Determine how a script path, command availability, module discovery, repository trust warnings, and missing native commands should be represented. Done means the cmdlet verifies commands from a .ps1 or .psm1 and reports the requested availability and security information.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.