Skip to content

Commit 7d0fb6e

Browse files
SteveL-MSFTSean Wheeler
authored andcommitted
update doc on new -workingdirectory parameter (#2320)
1 parent fb78f5d commit 7d0fb6e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

reference/6/Microsoft.PowerShell.Core/About/about_pwsh.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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"
107108
Sets the window style for the session. Valid values are Normal, Minimized,
108109
Maximized 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

112119
Executes the specified commands (and any parameters) as though they were typed
@@ -147,4 +154,6 @@ pwsh -Version
147154
pwsh -Command {Get-Command -Name Get-Command}
148155
149156
pwsh -Command "& {Get-Command -Name Get-Command}"
157+
158+
pwsh -WorkingDirectory ~/Downloads
150159
```

0 commit comments

Comments
 (0)