Windows Vista Forums

PowerShell's Default Start Directory

  1. #1


    Algernon Guest

    PowerShell's Default Start Directory

    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 System SpecsSystem Spec

  2. #2


    RichS Guest

    RE: PowerShell's Default Start Directory

    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 System SpecsSystem Spec

  3. #3


    dreeschkind Guest

    RE: PowerShell's Default Start Directory

    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 System SpecsSystem Spec

  4. #4


    Guest

    Re: PowerShell's Default Start Directory


    "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 System SpecsSystem Spec

PowerShell's Default Start Directory

Similar Threads
Thread Forum
Default folder/directory
Whenever I right-click on a picture from the web to save it, my system always opens a specific folder to save it in, which is a directory NOT of my...
Vista General
Set and Get IIS Virtual Directory properties using PowerShell
I am not able to findout the way to set/get properties of IIS virtual directory using powershell. Properties like Local path, Application Name and...
PowerShell
Moving Wallpaper Default Directory
Is it possible to move the default Vista Wallpaper directory from C:\Windows\Web\Wallpaper? I tried the registry tweak that worked with XP, but it...
General Discussion
How Do You Change The Default Install Directory?
How would you go about changing the default install directory. I just freshly installed vista x64 and was wondering how to change the default install...
General Discussion
Directory Size using PowerShell
Hello, I have about 45 directories that have about 10 nested directories with tens of thousands of files in the directory. I have folder...
PowerShell
How to change default spam directory ?
Hi, I'd like to change he directory where Windows Mail move spam mail because I don't have rights to create the good directory on my IMAP...
Vista mail
Powershell & Active Directory
Im looking for some tutorial, whitepaper or anyting that get me going on how to use powershell for AD administration Anyone have a hint for me?
PowerShell