Starting directory for Exchange Management Shell
Starting directory for the Exchange Management Shell is C:\documents and settings\administrator, but mine opens up in C:\documents and settings\administrator\start menu\programsWhat is the cause of this and how to change back to default?
September 22nd, 2009 1:40am

In the properties of icon you use to launch powershell, what directory is set for the value of "Start in" ?
Free Windows Admin Tool Kit Click here and download it now
September 22nd, 2009 1:56am

Go to the properties of Exchange Management shell (Start-Programs-Exc.......) and change the value of Start in to %HOMEDRIVE%%HOMEPATH%Once changed it will open in C:\documents and settings\administrator
September 22nd, 2009 5:17am

You can also try creating a Profile in Powershell and set the location to the required path. The profile can also be used for other purpose which you want to invoke while powershell startup. Try below. At the powershell prompt, type below... New-Item -Path $Profile -ItemType file -force A file will be created on the logged in user's profile which can be edited in notepad. To open the file in notepad, type below... Notepad $profile To set the location type the below command in notepad you just opened. Set-Location "C:\documents and settings\administrator" You can also create a function in the profile file itself to call the $profile to open in notepad by a shortcut. Create a function to open profile in notepad for editing. After creating function you just need to type the name of function to open profile file for editing. Function pro {Notepad $profile} Save the file and close notepad. Restart PowerShell and there you go... i hope this helps. Thanks.Vishal Ramnani | MCITP - Exchange 2007 | MCSE Messaging | MCTS - Win 2008 Config
Free Windows Admin Tool Kit Click here and download it now
September 22nd, 2009 10:24am

Yes, agree with Vishal. That' the more elegant way to do it, a lot more flexible and more in the spirit of PowerShell. There's a local and a global profile.The command for setting the sart-up directory for c:\ would be: set-location c:\ If you are serious about PowerShell, you should installQuest PowerGUI, which is a free download http://powergui.org/downloads.jspa From within the PowerGUI Script Editor, File,Open Current User Profile orOpen All Users profile. If no profile file is present, PowerGUI will create it for you. In order to edit the All Users profile, you need elevated permissions as a local administrator on Windows 2008 and 7. You can add aliases and PSSnapins through the profile. This is quite analogues to how you would configure a UNIX shell. jas
September 23rd, 2009 12:39am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics