Link to home
Create AccountLog in
Avatar of timgreen7077

asked on

Exchange 2016 Management Shell

Is there a way to load Exchange 2106 Shell to run instead of plain powershell. This will be a scheduled task, but it seems to need EMS instead of powershell only.
Avatar of Alan
Flag of New Zealand image


I think you mean you want to run 'Exchange Management Shell'?

Is that correct?

Avatar of timgreen7077


Yes it's the exchange management she'll. but it's exchange 2016 and the exchange ps snapin isn't supported.
Avatar of Jakob Digranes
Jakob Digranes
Flag of Norway image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
You just need to load within the ps script the snapin

#Load Exchange pssnapin it's not loaded
if (-not (Get-PSSnapin | Where-Object {$_.Name -like "Microsoft.Exchange.Management.PowerShell.E2010"})){ 
    Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 
	write-log -level Load -Message "The Exchange PS Snap-in is already loaded"

Open in new window

Can be 2010 or 2013. it would work.
Add those lines before actually doing the PS exchange cmdlets calls.
Jose, it's Exchange 2016. That is what I'm inquiring about. Not 2010 / 2013.
It doesn't matter.
what i meant was if you use this line
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

IT will work for any exchange version, like 2010,2013 and 2016. did you even try it ?.