Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have found a way to load exchange 2010 powershell into powershell running on a windows xp workstation, however there are a few commands that need to run. I was wondering how I could load them into a profile somehow. These are the commands that I need to run before I can do any of the exchange things such as Get-Mailbox.

COMMAND 1 $session = New-PSSession -Configurationname Microsoft.Exchange –ConnectionUri http://servername/powershell -Credential $user

(it prompts you for a username and p/word then the next command)

COMMAND 2 Import-PSSession $session

Then I am able to run exchange 2010 commands such as Get-Mailbox. Anyway I can load these so that when I click on the powershell shortcut they preload the importing of exchange commands.


share|improve this question
up vote 8 down vote accepted

You can add them to your powershell profile

share|improve this answer
How do I do that? – JohnyV Apr 26 '10 at 23:11
never mind saw your hyperlink...thanks – JohnyV Apr 26 '10 at 23:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.