Solved

Setup Exchange Environment Reporting Scheduled Task?

Posted on 2014-04-17
2
1,913 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
2 Comments
 
LVL 14

Accepted Solution

by:
Justin Yeung earned 500 total points
Comment Utility
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
Comment Utility
Did anyone get this working, I am having difficulties   creating a schedule task to run this report daily.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create an Accepted Domain 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 >> Ac…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now