• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

PowerShell's Default Start Directory

A

Algernon

#1
How do I change the directory that PowerShell starts in? it shows my
"Documents and Settings\username" for a path after the prompt, but I
just want to see "PS C:\"
 

My Computer

R

RichS

#2
Do you want PowerShell to start in c:\ ?

if so then right click the icon you use to start it and chnage the "Start
in: " property on the Shortcut tab to be the folder where you want to start

Do you just want the prompt to say C:\ irrespective of where you start?

If so then change the prompt function in your profile so that it says "C:\"


--
Richard Siddaway
Please note that all scripts are supplied "as is" and with no warranty
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk


"Algernon" wrote:

> How do I change the directory that PowerShell starts in? it shows my
> "Documents and Settings\username" for a path after the prompt, but I
> just want to see "PS C:\"
>
>
 

My Computer

D

dreeschkind

#3
Putting

set-location c:\

in your PowerShell startup script ($profile) might also be an option.

....\MyDocs\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

--
greetings
dreeschkind

"Algernon" wrote:

> How do I change the directory that PowerShell starts in? it shows my
> "Documents and Settings\username" for a path after the prompt, but I
> just want to see "PS C:\"
>
>
 

My Computer

G

Guest

#4
"Algernon" <kelly.dyjur@gmail.com> a écrit dans le message de news:
1179930843.687958.327430@h2g2000hsg.googlegroups.com...
> How do I change the directory that PowerShell starts in? it shows my
> "Documents and Settings\username" for a path after the prompt, but I
> just want to see "PS C:\"
>


in your $PROFILE file, you can add a
Set-Location "xxxxxxxxx"
where xxxxxxxxx is the path you want to start on.

bye
Nico
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)