Solved

Setup Exchange Environment Reporting Scheduled Task?

Posted on 2014-04-17
2
2,199 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
In this video we show how to create an Address List 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 Organization >> Ad…
This video discusses moving either the default database or any database to a new volume.

724 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