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 24
timgreen7077Exchange EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Check Out How Miercom Evaluates Wi-Fi Security!

It's not just about Wi-Fi connectivity anymore. A wireless security breach can cost your business large amounts of time, trouble, and expense. Plus, hear first-hand from Miercom on how WatchGuard's Wi-Fi security stacks up against the competition plus a LIVE demo!

Jose Gabriel Ortega CastroCEOCommented:
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 CastroCEOCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.