Writing & StyleStyle guide

Formatting Command-Line Options

Formatting Command-Line Options records the relevant Microsoft Style Guide convention while keeping it explicitly house-style scoped rather than presenting it as a universal grammar rule.

Quick answer

Set command-line options in code style and capitalize each option exactly as it must be typed.

Key details

Core IssueMicrosoft style formats command-line options, switches, and flags in code style and preserves the capitalization required by the actual option.
RegisterMicrosoft technical and professional documentation

Important caveats

Scope Boundary

This is Microsoft technical style; the documented tool’s syntax is authoritative when option spelling or case differs.

Further guidance

Content

Set command-line options in code style and capitalize each option exactly as it must be typed.

Purpose

Keep literal flags visually distinct and prevent editorial capitalization from changing executable syntax.

Sources and evidence

Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.

  1. Formatting text in instructions — Microsoft Style Guide (opens in a new tab)Microsoft · Current Microsoft technical-style conventions for formatting UI references, user input, commands, code-related elements, and other text in instructions.

Explore the topic