?
Solved

Setup Exchange Environment Reporting Scheduled Task?

Posted on 2014-04-17
2
Medium Priority
?
2,282 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 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
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…
Suggested Courses

770 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