Format Document
Code formatting for PowerShell.
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.
Install-Module 'PSScriptAnalyzer' -Scope CurrentUserLast updated