Skip to content

Add PowerShell samples for Windows users throughout documentation#115

Merged
maniSbindra merged 5 commits into
mainfrom
copilot/fix-114
Jul 26, 2025
Merged

Add PowerShell samples for Windows users throughout documentation#115
maniSbindra merged 5 commits into
mainfrom
copilot/fix-114

Conversation

Copilot AI commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

This PR adds comprehensive PowerShell examples for Windows users throughout the MPF documentation, addressing the need for Windows-specific command samples alongside the existing bash/shell examples.

Changes Made

📋 Installation and Quickstart (docs/installation-and-quickstart.md)

  • Added Windows PowerShell download and installation example using Invoke-WebRequest and Expand-Archive
  • Added PowerShell service principal creation example with ConvertFrom-Json parsing
  • Added PowerShell environment variable examples for ARM, Bicep, and Terraform commands using $env: syntax
  • Used proper Windows conventions (.exe extension, backslash paths)

🔍 Display Options (docs/display-options.MD)

  • Added PowerShell examples for detailed output, JSON output, and logging options
  • Added PowerShell example for complex ARM template scenarios
  • Maintained consistent formatting with existing bash examples

🧪 Testing Examples (Readme.MD)

  • Added PowerShell examples for all end-to-end test commands
  • Included Windows-specific paths for tools (e.g., C:\Program Files\Azure Bicep CLI\bicep.exe)
  • Used PowerShell-specific commands like Get-Command for dynamic path resolution

⚙️ Command Reference (docs/commandline-flags-and-env-variables.md)

  • Added explanatory note about environment variable syntax differences between platforms
  • Clarified bash vs PowerShell syntax for setting environment variables

Example Before/After

Before (bash only):

export MPF_SUBSCRIPTIONID=YOUR_SUBSCRIPTION_ID
export MPF_TENANTID=YOUR_TENANT_ID
$ ./azmpf arm --templateFilePath ./samples/templates/template.json

After (bash + PowerShell):

export MPF_SUBSCRIPTIONID=YOUR_SUBSCRIPTION_ID
export MPF_TENANTID=YOUR_TENANT_ID
$ ./azmpf arm --templateFilePath ./samples/templates/template.json

Or using PowerShell on Windows:

$env:MPF_SUBSCRIPTIONID = "YOUR_SUBSCRIPTION_ID"
$env:MPF_TENANTID = "YOUR_TENANT_ID"
.\azmpf.exe arm --templateFilePath .\samples\templates\template.json

Key Features

  • ✅ Consistent PowerShell syntax throughout all documentation
  • ✅ Windows-appropriate file paths and executable names
  • ✅ Maintains existing bash examples for cross-platform compatibility
  • ✅ No breaking changes to existing functionality
  • ✅ All tests continue to pass

This improvement makes the MPF utility more accessible to Windows developers who prefer PowerShell over bash/WSL environments.

Fixes #114.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits July 25, 2025 08:21
Co-authored-by: maniSbindra <6338721+maniSbindra@users.noreply.github.com>
Co-authored-by: maniSbindra <6338721+maniSbindra@users.noreply.github.com>
Copilot AI changed the title [WIP] Add samples for powershell on windows Add PowerShell samples for Windows users throughout documentation Jul 25, 2025
Copilot AI requested a review from maniSbindra July 25, 2025 08:33

@maniSbindra maniSbindra 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.

Tested steps for ARM and Bicep with powershell on windows and these look good

Comment thread Readme.MD Outdated
Comment thread Readme.MD Outdated
Comment thread Readme.MD Outdated
Comment thread docs/display-options.MD Outdated
Comment thread docs/display-options.MD Outdated
…rmatting

Co-authored-by: maniSbindra <6338721+maniSbindra@users.noreply.github.com>
Copilot AI requested a review from maniSbindra July 26, 2025 12:12

@maniSbindra maniSbindra 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.

lgtm

@maniSbindra maniSbindra marked this pull request as ready for review July 26, 2025 12:21
@maniSbindra maniSbindra requested a review from a team as a code owner July 26, 2025 12:22
@maniSbindra maniSbindra enabled auto-merge July 26, 2025 12:24
@maniSbindra maniSbindra added this pull request to the merge queue Jul 26, 2025
@maniSbindra maniSbindra removed this pull request from the merge queue due to a manual request Jul 26, 2025
@maniSbindra

Copy link
Copy Markdown
Contributor

@copilot following markdown linting errors exist

task: [lint:md] markdownlint-cli2 ".//*.md" --config "./.github/linters/.markdownlint-cli2.yaml" --fix
markdownlint-cli2 v0.18.1 (markdownlint v0.38.0)
Finding: ./
/*.md
Linting: 6 file(s)
Summary: 3 error(s)
docs/installation-and-quickstart.md:94 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: ""] docs/installation-and-quickstart.md:166 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: ""]
docs/installation-and-quickstart.md:248 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
task: Failed to run task "lint:md": exit status 1

…locks

Co-authored-by: maniSbindra <6338721+maniSbindra@users.noreply.github.com>

Copilot AI commented Jul 26, 2025

Copy link
Copy Markdown
Contributor Author

@copilot following markdown linting errors exist

task: [lint:md] markdownlint-cli2 "./**/*.md" --config "./.github/linters/.markdownlint-cli2.yaml" --fix
...

Fixed the markdown linting errors by adding language specifications (text) to the three fenced code blocks in docs/installation-and-quickstart.md. All MD040/fenced-code-language errors are now resolved. (1e316bf)

@maniSbindra maniSbindra added this pull request to the merge queue Jul 26, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 26, 2025
@maniSbindra maniSbindra added this pull request to the merge queue Jul 26, 2025
Merged via the queue into main with commit c33eec8 Jul 26, 2025
13 checks passed
@maniSbindra maniSbindra deleted the copilot/fix-114 branch July 26, 2025 19:04
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.

Add samples for powershell on windows

2 participants