I am trying to create module for users so they can run Exchange cmdlets from their desktops.

This works fine when I use script below

function Enable-ExchangeExplicitRemoting {cmdletbinding()] param( [Parameter(ValueFromPipeline=$true)] [string]$exchServer ) Write-Verbose "Creating PSSession.." $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Authentication Kerberos Write-Verbose -verbose "Importing PSSession" Import-PSSession $s -Verbose -AllowClobber |out-null } Enable-ExchangeExplicitRemoting -exchServer "servername" 

I am able to run Exchange cmdlets on remote server and get the data back.

However if I add this function to an existing module , and then load this module , this function does not load from the module as expected.

>get-command Enable-ExchangeImplicitRemoting CommandType Name ----------- ---- Function Enable-ExchangeImplicitRemoting Enable-VTBExchangeImplicitRemoting -exchServer "servername" VERBOSE: Importing function 'Add-ADPermission'. VERBOSE: Importing function 'Add-AvailabilityAddressSpace'. VERBOSE: Importing function 'Add-ContentFilterPhrase'. ....... get-mailbox The term 'get-mailbox' is not recognized as the name of a cmdlet, function, scrip 
2

Related questions 8 How to use PowerShell and PowerShell modules in the enterprise 0 C# \ Exchange 2010 PS1 Script 4 PowerShell Workflow Exchange Remoting Related questions 8 How to use PowerShell and PowerShell modules in the enterprise 0 C# \ Exchange 2010 PS1 Script 4 PowerShell Workflow Exchange Remoting 1 powershell remoting to exchange: Set-CASMailbox does not have property ActiveSyncBlockedDeviceIDs 2 How can I connect to Exchange server remotely through Powershell and a PSSessionConfiguration 1 Powershell Exchange Module remote mailbox issue 2 Invoking-Command for Exchange in Powershell - block is not allowed in a Data section 0 Error when using powershell while remoting in Exchange 2010 3 Import-PSSession Error when called in a function 0 Error in executing Exchange PS remoting: Method invocation failed? Load 7 more related questions Show fewer related questions

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.