> For the complete documentation index, see [llms.txt](https://docs.poshtools.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.poshtools.com/open-source-tools/visual-studio/format-document.md).

# Format Document

Code formatting can be accomplished by using the standard `Ctrl+K`, `Ctrl+D` keyboard shortcut within Visual Studio.

The PSScriptAnalyzer module is required to perform formatting. From Windows PowerShell, you can install PSScriptAnalyzer with `Install-Module`.

```powershell
Install-Module 'PSScriptAnalyzer' -Scope CurrentUser
```
