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.
LVL 16
timgreen7077Exchange EngineerAsked:
Who is Participating?
 
Jakob DigranesSenior ConsultantCommented:
take a look here - remote powershell should do the trick; https://technet.microsoft.com/en-us/library/dd335083(v=exchg.160).aspx
1
 
AlanConsultantCommented:
Hi,

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

Is that correct?

Alan.
0
 
timgreen7077Exchange EngineerAuthor Commented:
Yes it's the exchange management she'll. but it's exchange 2016 and the exchange ps snapin isn't supported.
1
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
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 
}
else{
	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.
https://social.technet.microsoft.com/wiki/contents/articles/38580.configure-to-run-a-powershell-script-into-task-scheduler.aspx
https://social.technet.microsoft.com/wiki/contents/articles/46768.how-to-run-a-powershell-script-with-parameters.aspx
0
 
timgreen7077Exchange EngineerAuthor Commented:
Jose, it's Exchange 2016. That is what I'm inquiring about. Not 2010 / 2013.
0
 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
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 ?.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.