Skip to content

docs: add reference assembly prerequisites for C# cmdlets - #13368

Open
OKAN TIKTAS (OKAN-SOFTWARE) wants to merge 3 commits into
MicrosoftDocs:mainfrom
OKAN-SOFTWARE:docs/4210-reference-assemblies
Open

OKAN TIKTAS (OKAN-SOFTWARE) wants to merge 3 commits into
MicrosoftDocs:mainfrom
OKAN-SOFTWARE:docs/4210-reference-assemblies

Conversation

@OKAN-SOFTWARE

Copy link
Copy Markdown
Contributor

Summary

  • Add a prerequisites section to the How to write a cmdlet tutorial.
  • Explain how to reference System.Management.Automation when compiling C# cmdlets.
  • Document the Windows PowerShell 5.1 and 5.0 reference assembly packages.
  • Link to Microsoft's guidance for choosing the appropriate PowerShell NuGet package.
  • Update the article modification date.

Why

The existing tutorial demonstrates C# code that depends on System.Management.Automation, but does not explain how to obtain the required reference assemblies.

These prerequisites help developers prepare their projects before compiling the example.

Fixes #4210

Validation

  • Reviewed the Markdown changes.
  • git diff --check passed.
  • Confirmed that only the intended documentation file was modified.
  • No runtime code changes.
  • The C# example was not compiled locally because the .NET SDK was unavailable.

AI assistance

AI assistance was used to draft and review the documentation change.
I, Okan Tiktas, personally reviewed the final changes and take responsibility for this contribution.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 16:57
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the documentation update explaining PowerShell reference assembly prerequisites.

No open issues 🎉

What changed in this PR

Adds compilation prerequisites to the C# cmdlet tutorial, addressing #4210 by explaining how to obtain the required System.Management.Automation reference assemblies.

Changes:

  • Documents reference assembly packages for Windows PowerShell 5.1 and 5.0, including a 5.1 PackageReference example.
  • Explains compilation-only use and links to guidance for choosing packages for other PowerShell versions.
  • Updates the article’s modification date.
File Description
reference/​docs-conceptual/​developer/​cmdlet/​how-to-write-a-simple-cmdlet.md Adds reference assembly prerequisites and package guidance; updates the modification date.

Review effort: Balanced

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 970b6a1:

💡 Validation status: suggestions

File Status Preview URL Details
reference/docs-conceptual/developer/cmdlet/how-to-write-a-simple-cmdlet.md 💡Suggestion View (>=powershell-5.1) Details

reference/docs-conceptual/developer/cmdlet/how-to-write-a-simple-cmdlet.md

  • Line 36, Column 1: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/powershell/scripting/dev-cross-plat/choosing-the-right-nuget-package' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 13e0e21:

💡 Validation status: suggestions

File Status Preview URL Details
reference/docs-conceptual/developer/cmdlet/how-to-write-a-simple-cmdlet.md 💡Suggestion View (>=powershell-5.1) Details

reference/docs-conceptual/developer/cmdlet/how-to-write-a-simple-cmdlet.md

  • Line 35, Column 1: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/powershell/scripting/dev-cross-plat/choosing-the-right-nuget-package' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit a741db9:

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/developer/cmdlet/how-to-write-a-simple-cmdlet.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

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.

Reference assemblies are needed for above example

2 participants