Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I remember reading about how it's possible to add scripts or commandlets to Exchange 2010... in a way that as soon as Powershell imports the remote commands, your custom command is available as well.

My thought is that I'll use Exchange's roles to allow constrained / elevated access to certain functionality thought this technique.

Does anyone know the name of the thing Im thinking of?

share|improve this question

3 Answers 3

What you want to do is create a custom Powershell module. Start here for the official MS documentation, but there are plenty of other tutorials available online. There is also a book called Professional Windows Powershell Programming that covers development of custom cmdlets and modules. It dives deep into the .NET level. Haven't read it myself so can't make a recommendation.

share|improve this answer
    
hmm... that isn't exactly what I was thinking of. There is integration with Exchange "Roles" feature, and powershell that I'm still trying to find. –  makerofthings7 Feb 12 '12 at 20:52

Sounds more like you wan't to load the Exchange module into your PowerShell Profile, as covered by Mike Pfeiffer right here. Then you would also be able to load in your own custom functions/cmdlets, modules, aliases and so on when the PowerShell Console starts up

I'm not sure I quite understand what you mean by Exchange "Roles", but if you are thinking about the management access control features introduced in Exchange Server 2010, read the official documentation on RBAC in Exchange 2010

This is not something you configure in the PowerShell console itself, you just use the EMS cmdlets to configure which management Roles specific users have and what privileges they have.

share|improve this answer
up vote 1 down vote accepted

This Technet article describes the process of making a PS1 script available to every computer that loads the Exchange runspace, even if the PS1 isn't installed on that PC.

Here are the general steps needed to publish your custom PS1 to the company:

  • On the Exchange server, move the script into C:\Program Files\Microsoft\Exchange Server\V14\Scripts

  • Then, create an unscoped top-level role

  • Add a management role entry to that role such as:

    Add-ManagementRoleEntry "IT Scripts\BulkProvisionUsers.ps1" -Parameters Name, Location -Type Script -UnscopedTopLevel

  • Finally You need to ensure that the cmdlet is available on all exchange servers the powershell instance may connect to.

share|improve this answer

Your Answer

 
discard

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.