.vscode/settings.json

{
    // Use a custom PowerShell Script Analyzer settings file for this workspace.
    // Relative paths for this setting are always relative to the workspace root dir.
    "powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1",
    // Places open brace on the same line as its associated statement.
    "powershell.codeFormatting.openBraceOnSameLine": true,
    // Adds a newline (line break) after an open brace.
    "powershell.codeFormatting.newLineAfterOpenBrace": true,
    // Adds a newline (line break) after a closing brace.
    "powershell.codeFormatting.newLineAfterCloseBrace": true,
    // Adds a space between a keyword and its associated scriptblock expression.
    "powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
    // Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression.
    "powershell.codeFormatting.whitespaceBeforeOpenParen": true,
    // Adds spaces before and after an operator ('=', '+', '-', etc.).
    "powershell.codeFormatting.whitespaceAroundOperator": true,
    // Adds a space after a separator (',' and ';').
    "powershell.codeFormatting.whitespaceAfterSeparator": true,
    // Does not reformat one-line code blocks, such as "if (...) {...} else {...}".
    "powershell.codeFormatting.ignoreOneLineBlock": true,
    // Align assignment statements in a hashtable or a DSC Configuration.
    "powershell.codeFormatting.alignPropertyValuePairs": true,
    // Shows the integrated console when the PowerShell extension is initialized.
    "powershell.integratedConsole.showOnStartup": true,
    // Switches focus to the console when a script selection is run or a script file is debugged. This is an accessibility feature. To disable it, set to false.
    "powershell.integratedConsole.focusConsoleOnExecute": true,
    // The number of spaces a tab is equal to. This setting is overridden
    // based on the file contents when `editor.detectIndentation` is true.
    "editor.tabSize": 2,
    // Insert spaces when pressing Tab. This setting is overriden
    // based on the file contents when `editor.detectIndentation` is true.
    "editor.insertSpaces": true,
    // When opening a file, `editor.tabSize` and `editor.insertSpaces`
    // will be detected based on the file contents. Set to false to keep
    // the values you've explicitly set, above.
    "editor.detectIndentation": false
}