Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Script Error

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2007] >> General >> Script Error Page: [1]
Login
Message << Older Topic   Newer Topic >>
Limited time MSExchange.org offer! -- 1.Sep.2008 1:00:00 PM
TechGenix and SolarWinds have partnered to provide free copies of SolarWinds Exchange Monitor to all visitors who join the MSExchange.org Forums. SolarWinds Exchange Monitor is a handy desktop dashboard that continuously monitors Microsoft Exchange to deliver real-time insight into Exchange services, mail queue sizes, and host server health. Learn more about Exchange Monitor and the free offer!
Script Error - 27.Aug.2008 6:31:46 AM   
jbrines

 

Posts: 4
Joined: 19.May2008
Status: offline
I was reading the article http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/getting-mailbox-statistics-exchange-2007.html and found it very interesting and started to use it but I am having issues with the attachment side of it and wonder if you can help. There error I am getting is below.
 
The term 'DisplayName' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and t
ry again.
At C:\Scripts\sendstats.ps1:12 char:12
+ DisplayName, <<<< @{label="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},
New-Object : Exception calling ".ctor" with "1" argument(s): "Could not find file 'C:\Documents and Settings\jbrinesda\
mailboxes.txt'."
At C:\Scripts\sendstats.ps1:18 char:25
+ $Attachment = New-Object  <<<< Net.Mail.Attachment("./mailboxes.txt")
Exception calling "Add" with "1" argument(s): "Value cannot be null.
Parameter name: item"
At C:\Scripts\sendstats.ps1:19 char:29
+ $SMTPMessage.Attachments.Add( <<<< $Attachment)



It sends the e-mail but nothing is attached.

Any idea what is wrong? 

 
Post #: 1
RE: Script Error - 28.Aug.2008 5:46:39 AM   
jbrines

 

Posts: 4
Joined: 19.May2008
Status: offline
This has been resolved by the author of the article.

The three lines that first start with “Get-MailboxStatistics” should all be one line within the script – the code has wrapped on the website.

(in reply to jbrines)
Post #: 2

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2007] >> General >> Script Error Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts