Writing & StyleStyle guide

Formatting Command-Line Commands

Formatting Command-Line Commands 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 commands in code style when you show the literal command a reader should recognize, enter, or copy.

Key details

Core IssueMicrosoft style formats command-line commands in code style in developer and instructional content.
RegisterMicrosoft technical and professional documentation

Important caveats

Scope Boundary

This is a Microsoft documentation convention; preserve the command’s literal spelling and syntax rather than changing it to match prose capitalization.

Further guidance

Content

Set command-line commands in code style when you show the literal command a reader should recognize, enter, or copy.

Purpose

Visually separate executable command text from the surrounding explanation.

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