Solved

Setup Exchange Environment Reporting Scheduled Task?

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

A brief introduction to what I consider to be the best editor for PowerShell.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
In this video we show how to create a Shared Mailbox 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 >> Sha…
To show how to create a transport rule 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 >> Rules tab.:  To cr…

827 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