File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
reference/6/Microsoft.PowerShell.Core/About Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ pwsh[.exe]
3131[-NoProfile]
3232[-OutputFormat {Text | XML}]
3333[-WindowStyle <style>]
34+ [-WorkingDirectory <DirectoryPath>]
3435[-File <FilePath> [<Args>]]
3536[-Command { - | <script-block> [-args <arg-array>]
3637| <string> [<CommandParameters>] } ]
@@ -107,6 +108,12 @@ Determines how output from PowerShell is formatted. Valid values are "Text"
107108Sets the window style for the session. Valid values are Normal, Minimized,
108109Maximized and Hidden.
109110
111+ #### -WorkingDirectory <DirectoryPath >
112+
113+ Sets the initial working directory when starting PowerShell. Any valid
114+ PowerShell file path is supported.
115+
116+ To start PowerShell in your home directory, use: pwsh -WorkingDirectory ~
110117#### -Command
111118
112119Executes the specified commands (and any parameters) as though they were typed
@@ -147,4 +154,6 @@ pwsh -Version
147154pwsh -Command {Get-Command -Name Get-Command}
148155
149156pwsh -Command "& {Get-Command -Name Get-Command}"
157+
158+ pwsh -WorkingDirectory ~/Downloads
150159```
You can’t perform that action at this time.
0 commit comments