Solved

Setup Exchange Environment Reporting Scheduled Task?

Posted on 2014-04-17
2
2,121 Views
Last Modified: 2016-08-16
Trying to create a Scheduled Task on my MS2008R2 server for Steve Goodmans Exchange Environment Reporting powershell,

Generate Exchange Environment Reports using Powershell by Steve Goodman
http://gallery.technet.microsoft.com/exchange/Generate-Exchange-2388e7c9

I can run the script manually, which then sends the email.
.\Get-ExchangeEnvironmentReport -HTMLReport c:\Scripts\report.html -SendMail:$true -MailFrom:sender@abc.com -MailTo:recip@abc.com -MailServer:mail.abc.com

So when creating the Scheduled Task, creating the Action, what would I need to enter in these fields?

Action:
Start a program

Program/Script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe or powershell.exe?

Add Arguments (optional):   (no idea here?)
? .\Get-ExchangeEnvironmentReport -HTMLReport c:\Scripts\report.html -SendMail:$true -MailFrom:sender@abc.com -MailTo:recip@abc.com -MailServer:mail.abc.com ?

Start in (optional):
?

OR

Does a bat file need to be created containing the command:
.\Get-ExchangeEnvironmentReport -HTMLReport c:\Scripts\report.html -SendMail:$true -MailFrom:sender@abc.com -MailTo:recip@abc.com -MailServer:mail.abc.com

then run that as a bat file instead of the above steps?

Thanks in advance guys!
0
Comment
Question by:GCTTechs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
Justin Yeung earned 500 total points
ID: 40007045
on the schedule task
use powershell.exe
and the argument will be

-path c:\script\Get-ExchangeEnvironmentReport.ps1 -HTMLReport c:\Scripts\report.html -SendMail:$true -MailFrom:sender@abc.com -MailTo:recip@abc.com -MailServer:mail.abc.com
0
 

Expert Comment

by:Amos James
ID: 41758506
Did anyone get this working, I am having difficulties   creating a schedule task to run this report daily.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question