This topic contains 6 replies, has 2 voices, and was last updated by
December 9, 2016 at 3:00 pm #59892
I need to create email accounts in powershell. I know how to create them using exchange shell, but how would I do it from "regular" powershell? The -ConfigurationName and -ConnectionUri are correct. We're using Exchange 2013.
Is there a import module for exchange like Import-Module ActiveDirectory?
$Exchange = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://webmail.companyname.com/PowerShell/
if I do
New-PSSession -ComputerName HQVEX01
, it opens the session
December 9, 2016 at 3:11 pm #59895
Give this a go, remoting etc.. will need to be enabled on the other end
$Username = "Domain\User.Name" $Password = ConvertTo-SecureString "Password" -AsPlainText -Force $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password $SESJA_EX = New-PSSession -Credential $cred -ConnectionUri http://Exhchangeserver/powershell -ConfigurationName microsoft.exchange Import-PSSession $SESJA_EX
December 9, 2016 at 3:12 pm #59896
If I'm running powershell already as as admin, do I still need the $Username and $Password?
December 9, 2016 at 3:15 pm #59901
yep as your importing a session,
December 9, 2016 at 3:14 pm #59899
WinRM cannot process the request. The following error occurred while using Kerberos authentication: Cannot find
the computer webmail.marinerfinance.com. Verify that the computer exists on the network and that the name provided is spelled correctly. For more information, see the about_Remote_Troubleshooting Help topic.
December 9, 2016 at 3:25 pm #59904
take a look at WRM on you machine an make sure kerbos is enabled also ps remoting
December 9, 2016 at 4:03 pm #59911
Thanks Mark, I'll try that
The topic ‘connecting to exchange’ is closed to new replies.