Announcement

Collapse
No announcement yet.

Exchange Powershell Profile

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exchange Powershell Profile

    All,

    I am not sure if this should be in the Exchange Forum or the Powershell forum...

    I have an exchange 2010 Hybrid environment in a multi-domain forest. Whenever I need to use exchange powershell I have to change the recipient scope using the cmdlet Set-AdServerSettings -ViewEntireForest $true

    What I would like to do is to have exchange Powershell Module run this automatically at startup so I created a powershell profile and added the cmdlet to a ps1 file but it loads BEFORE the exchange module is loaded so I get an error everytime.

    In addition it loads whenever I start any powershell session rather than just the exchange module.

    Is there a way I can get this to load in the exchange powershell session only (not non-exchange powershell) and to do so AFTER it has loaded the necessary modules.

  • #2
    Re: Exchange Powershell Profile

    Create a profile

    http://technet.microsoft.com/en-us/l.../ee156814.aspx

    Comment


    • #3
      Re: Exchange Powershell Profile

      Originally posted by wullieb1 View Post
      Originally posted by sailingbikeruk View Post
      All,

      so I created a powershell profile and added the cmdlet to a ps1 file but it loads BEFORE the exchange module is loaded so I get an error everytime.
      Have I not already tried that? My problem was that the profile didn't solve it so I have either done something wrong or it isn't the solution.

      Comment


      • #4
        Re: Exchange Powershell Profile

        Originally posted by sailingbikeruk View Post
        Have I not already tried that? My problem was that the profile didn't solve it so I have either done something wrong or it isn't the solution.
        Sorry I missed that.

        What file have you editied?

        Open powershell and type $profile and check that you've edited the correct profile.

        Mine is current located in My Documents\WindowsPowershell Folder

        Another method by creating a dedicated shortcut. Show with IIS but should be similar.

        http://blogs.iis.net/sergeia/archive...is-module.aspx

        No time to test at the moment but if I get a chance over the weekend I will try.
        Last edited by wullieb1; 20th March 2014, 01:08.

        Comment

        Working...
        X