Just a guess, does the account you specified in Scheduled Tasks have at least 
Exchange View permissions?

-------------------------------------------------
Thank you,
Pete Kretche
MCP, A+
Network Systems Administrator
UW - Green Bay
Voice: 920.465.5014
Fax: 920.465.2864
[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>


From: Angie Urtel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 26, 2008 12:55 PM
To: MS-Exchange Admin Issues
Subject: scheduled PowerShell task

I'd like to put this into Task Scheduler, but I can't seem to find the right 
commands in order to run it from my workstation.

Saved as databases.ps1:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
get-mailbox -resultSize unlimited | ft DisplayName, Alias, Database > 
"c:\temp\databases.txt"

Scheduled task:
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -command 
"C:\temp\databases.ps1"

The error I get is "Active Directory server is not available.  Supplied 
credentials are invalid"
When I run it from the Exchange Shell, it works great.  Only errors outside of 
the Exchange Shell.  What am I missing?  This is the first time I've tried 
scheduling PS output.

Thanks-
Angie



~ Ninja Email Security with Cloudmark Spam Engine Gets Image Spam ~
~             http://www.sunbeltsoftware.com/Ninja                ~

Reply via email to