Exchange 2010 report not working
Hi all,
I'm trying to compose a mailbox size report for Exchange 2010. The output is to an html file that is automatically emailed to whoever I wish it to be. The functionality works GREAT, but the report is outputting no data. Can someone tell me why? I have multiple
databases, but it still shouldn't output a file with NO data. Here is the script:
#Variables to configure
$MailServer = "my mail server"
$ReportSender = "my email"
$ReportRecipient = "their email"
$MailSubject = ("Mailbox Report for " + $MailServer + " - " + ( get-date ).ToString('yyyy/MM/dd'))
#SendEmailFunction
Function sendEmail
{ param($smtphost,$htmlFileName)
$smtp= New-Object System.Net.Mail.SmtpClient$smtphost
$msg = New-Object System.Net.Mail.MailMessage $ReportSender, $ReportRecipient, $MailSubject, (Get-Content $htmlFileName)
$msg.isBodyhtml = $true
$smtp.send($msg)
$exdata = Get-MailboxStatistics -Server $MailServer | Sort-Object TotalItemSize -descending | Select-Object DisplayName, ItemCount, TotalItemSize, StorageLimitStatus
$fileName = "exchange2010Report.html"
New-Item -ItemType file $fileName -Force
# HTML start
Add-Content $fileName "<html>"
# HEAD start
Add-Content $fileName "<head>"
add-content $fileName '<STYLE TYPE="text/css">'
add-content $fileName "<!--"
add-content $fileName "td {"
add-content $fileName "font-family: Tahoma;"
add-content $fileName "font-size: 11px;"
add-content $fileName "border-top: 1px solid #999999;"
add-content $fileName "border-right: 1px solid #999999;"
add-content $fileName "border-bottom: 1px solid #999999;"
add-content $fileName "border-left: 1px solid #999999;"
add-content $fileName "padding-top: 0px;"
add-content $fileName "padding-right: 0px;"
add-content $fileName "padding-bottom: 0px;"
add-content $fileName "padding-left: 0px;"
add-content $fileName "}"
add-content $fileName "body {"
add-content $fileName "margin-left: 5px;"
add-content $fileName "margin-top: 5px;"
add-content $fileName "margin-right: 0px;"
add-content $fileName "margin-bottom: 10px;"
add-content $fileName ""
add-content $fileName "table {"
add-content $fileName "border: thin solid #000000;"
add-content $fileName "}"
add-content $fileName "-->"
add-content $fileName "</style>"
# HEAD end
Add-Content $fileName "</head>"
# HEAD start
Add-Content $fileName "<body>"
# TABLE start
Add-Content $fileName "<table width='100%'>"
# TABLE Header
Add-Content $fileName "<tr bgcolor='#7C7C7C'>"
Add-Content $fileName "<td width='35%'>DisplayName</td>"
Add-Content $fileName "<td width='10%'>ItemCount</td>"
Add-Content $fileName "<td width='10%'>TotalItemSize</td>"
Add-Content $fileName "<td width='25%'>Database</td>"
Add-Content $fileName "<td width='20%'>StorageLimitStatus</td>"
Add-Content $fileName "</tr>"
$alternateTableRowBackground = 0
# TABLE Content
while($alternateTableRowBackground -le $exdata.length)
if(($alternateTableRowBackground % 2) -eq 0)
Add-Content $fileName "<tr bgcolor='#CCCCCC'>"
else
Add-Content $fileName "<tr bgcolor='#FCFCFC'>"
Add-Content $fileName ("<td width='30%'>" + $exdata[$alternateTableRowBackground].DisplayName + "</td>")
Add-Content $fileName ("<td width='10%'>" + $exdata[$alternateTableRowBackground].ItemCount + "</td>")
Add-Content $fileName ("<td width='15%'>" + $exdata[$alternateTableRowBackground].TotalItemSize + "</td>")
Add-Content $fileName ("<td width='25%'>" + $exdata[$alternateTableRowBackground].Database+ "</td>")
#BelowLimit or NoChecking
if(($exdata[$alternateTableRowBackground].StorageLimitStatus -eq "BelowLimit") -or ($exdata[$alternateTableRowBackground].StorageLimitStatus -eq "NoChecking"))
Add-Content $fileName ("<td bgcolor='#007F00' width='20%'>" + $exdata[$alternateTableRowBackground].StorageLimitStatus+ "</td>")
#IssueWarning
if($exdata[$alternateTableRowBackground].StorageLimitStatus -eq "IssueWarning")
Add-Content $fileName ("<td bgcolor='#7F7F00' width='20%'>" + $exdata[$alternateTableRowBackground].StorageLimitStatus+ "</td>")
#ProhibitSend or MailboxDisabled
if(($exdata[$alternateTableRowBackground].StorageLimitStatus -eq "ProhibitSend") -or ($exdata[$alternateTableRowBackground].StorageLimitStatus -eq "MailboxDisabled"))
Add-Content $fileName ("<td bgcolor='#7F0000' width='20%'>" + $exdata[$alternateTableRowBackground].StorageLimitStatus+ "</td>")
Add-Content $fileName "</tr>"
$alternateTableRowBackground = $alternateTableRowBackground + 1
# Summe Mailboxsize
Add-Content $fileName "<tr bgcolor='#7C7C7C'>"
Add-Content $fileName ("<td width='30%'></td>")
$tempdata = MailboxStatistics -Server $MailServer | %{$_.ItemCount} | Measure-Object -Sum
Add-Content $fileName ("<td width='10%'>" + ($tempdata | Select-Object -expand Sum) + "</td>")
$tempdata = MailboxStatistics -Server $MailServer | %{$_.TotalItemSize.Value.ToMB()} | Measure-Object -Sum
Add-Content $fileName ("<td width='15%'>" + ($tempdata | Select-Object -expand Sum) + " MB</td>")
Add-Content $fileName ("<td width='25%'></td>")
Add-Content $fileName ("<td width='20%'></td>")
#TABLE end
Add-Content $fileName "</table>"
# HEAD end
Add-Content $fileName "</body>"
# HTML end
Add-Content $fileName "</html>"
sendEmail $MailServer $fileName
Any help is appreciated. Thanks!
You can make it simple on the HTML format...Try the below format on replacement of HTML format page..
## HTML PAGE FORMAT
$a = “<style>”
$a = $a + “BODY{background-color:Lavender;}”
$a = $a + “TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}”
$a = $a + “TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:Bisque}”
$a = $a + “TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:Beige}”
$a = $a + “</style>”
## HTML PAGE FORMAT
$exdata = Get-MailboxStatistics -Server $MailServer | Sort-Object TotalItemSize -descending | Select-Object DisplayName, ItemCount, TotalItemSize, StorageLimitStatus | ConvertTo-Html -body “<h2> Mailbox Size Users List Report</h2>” -head $a |
Set-Content c:\temp\Exchange2013UserReport.html
Exchange Queries
Similar Messages
-
Exchange 2010 - Archiving not working in desired situation
Hi guys!
Recently we had enabled online archiving on Exchange, the problem is that one thing is not working as we have wanted.
We wanted that user picks up manually thru Outlook 2013 client which folder he does not wishes to be moved to archive, but this is not working with our current settings.
These are the settings on server side
bostjancah sorry, its retentionaction not retentiontag so here is the correct parameter
Get-RetentionPolicyTag "Don't Move this*" | Set-RetentionPolicyTag -RetentionAction
"MoveToArchive"
Blog |
Get Your Exchange Powershell Tip of the Day from here -
Microsoft Exchange 2010 does not work
I debated a long time between a Galaxy S3 and an Iphone 5. I had an Incredible and loved it. I went with the Galaxy, and it is basically unusable for my email. I just got it yesterday. I spent 2 hours on Verizon support, and the tech couldn't fix it. I took it back to the store where they couldn't fit it either, but told me it was probably a problem with the server. Yet, the Incredible worked just fine with the same server. I get the email, but sometimes it will open when I tap on an individual email and sometimes it doesn't. Sometimes when I open the email from the home screen, it just is black. Sometimes it loads and freezes. I have been researching this on the net, and it looks like, as someone said, "there are lots of problems" about this very issue. Now I have a very expensive, new phone that does not work for me.
Incoming Emails disappearing. I just spent over an hour at the Verizon store. They could not help with this issue of incoming emails disappearing. I had to explain the problem several times as she could not understand this issue. We called Tech Support from the store who advises that Samsung is having issues with emails disappearing. I was told they were working on a fix and it should have been fixed by Dec 26. I purchased my phone prior to this date and my emails have always disappeared. It's frustrating going from a Droix X dumbphone to something that I expect to work and it doesn't! Otherwise the phone is great! I just need to be patient while they work on a solution which I am not. Verizon also recommended that I call Samsung directly!
-
Just updated to my macbook pro to 10.8.2. ical not synching with my Exchange 2010 server. Worked flawlessly prior to the upgrade. Settings set to auto discover. I matched settings of a partner in my who is still using 10.7.1 without issues. Help!
Also - my battery has been telling me "service battery" for a LONG time and then it switched to "replace soon" som time ago. Can't really see what this has to do with anything but whatever.
That could conceivably explain all the problems you're describing. Replacing a Mac's battery should not be postponed since a failed battery will cause other problems to occur. It is also possible that its hard disk has failed, which means the information on it may soon become unrecoverable.
... my latest TM back up was from April 2014, can I just run this when I have rescued everthing and then it might not be as slow?
If that Time Machine backup remains intact, it may be the only viable means of recovering that Mac's information. I suggest you do not attempt to restore its contents to your ailing Mac.
Given that you are having trouble creating a newer Time Machine backup you should stop using that Mac immediately and have it serviced as soon as you are able. Do not take it to anyone other than Apple or a service facility authorized by Apple, for the very reasons you explained. If there are no Apple Stores in your vicinity search for an Authorized Apple Service Provider using the Contact Us link below. Use one of the options that appear under Contact Apple Support. The language on that page will be different for your location. -
Unable to generate two Exchange 2010 reports
i
I am using SCOM 2007 R2 and I am not able to pull the below Exchange 2010 reports in SCOM. till Last month its working fine and now the issue started.
1. Report Name: Microsoft.Exchange.2010.Reports.Transport.Platform.TopUsers
Error Message
Date: 2014-09-12 22:02:22
Application: System Center Operations Manager 2007 R2
Application Version: 6.1.7221.81
Severity: Error
Message: Cannot initialize report.
Microsoft.Reporting.WinForms.ReportServerException: An internal error occurred on the report server. See the error log for more details. (rsInternalError) ---> Microsoft.Reporting.WinForms.ReportServerException: For more information about this error
navigate to the report server on the local server machine, or enable remote errors
--- End of inner exception stack trace ---
at Microsoft.Reporting.WinForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WinForms.ServerReport.GetParameters()
at Microsoft.EnterpriseManagement.Mom.Internal.UI.Reporting.Parameters.ReportParameterBlock.Initialize(ServerReport serverReport)
at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ReportForm.SetReportJob(Object sender, ConsoleJobEventArgs args)
Microsoft.Reporting.WinForms.ReportServerException: For more information about this error navigate to the report server on the local server machine, or enable remote errors
2.Microsoft.Exchange.2010.Reports.SLA
Error Message:
An error has occured during report processing.
Query execution failed for dataset 'OutageBreakdown'
For more information about this error navigate to the report server on the local server machine, or enable remote errors.
Please help us to resolve this issue.
Donald D'souza (http://donald-scom.blogspot.com/)Regarding the error, please also try the following methods:
Error message when you try to generate a report in System Center Operations Manager 2007: "Cannot initialize report"
http://support.microsoft.com/kb/942865
SCOM - "Cannot initialize report" error
http://blogs.technet.com/b/csstwplatform/archive/2009/02/16/scom-cannot-initialize-report-error.aspx
SCOM R2 Console error message: Cannot initialize report.
http://thoughtsonopsmgr.blogspot.com/2010/04/scom-r2-console-error-message-cannot.html
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
Mai Ali | My blog: Technical | Twitter:
Mai Ali -
hello,
i have an issue in my SCOM 2012 report.when i go to
Reporting --> Exchange Server 2010 Report Library-->and open the report Microsoft.Exchange.2010.Reports.Transport.Platform.Top users.
in my scom 2012 console and execute the report for top users on the basis of Messages Send or Messages Received ,it return zero result.
thank youHi,
Blank reports can be a common issue with System Center Operations Manager. These are caused by many different reasons, and for the focus of this article we will discuss the following:
1. The wrong type of entity was selected as the report target.
2. The corresponding performance collection rule or the script that generates the performance data is not enabled for the report target.
3. There is a functional problem with the Health Service on the agent.
4. Management servers are unable to insert data into the OperationsManagerDW database.
5. Data is stuck in the staging tables in the OperationsManagerDW database.
More details:
https://support2.microsoft.com/kb/2573329?wa=wsignin1.0
In addition, it is suggested to configure the Exchange management pack according to the mangement pack guide.
And here are two links that should be helpful for you regarding to this issue, please refer to them:
http://zoomindia111.wordpress.com/configure-exchange-2010-sp1-management-pack-in-scom-2007-r2/
http://blogs.technet.com/b/emreguclu/archive/2011/09/26/empty-exchange-2010-server-statistics-mailflow-reports-if-default-log-directory-has-changed.aspx
Regards,
Yan Li
Regards, Yan Li -
After i install Visual-Studio 2013 crystal-report not working
hi
after i install Visual-Studio 2013 crystal-report not working on my Visual-Studio 2010 projects
when i try to open crystal-report i see this:Hi E_gold,
Crystal Reports forum may be a better place for you.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Exchange 2010 Ative Sync working fine but when i do the test-ActiveSyncConnectivity it gives Error
Exchange 2010 Ative Sync working fine but when i do the test-ActiveSyncConnectivity it gives Error my internal and external domains are different i have godaddy certificate and i have redirected HTTP to HTTPS for OWA, but when i run the test-ActiveSyncConnectivity
https://mail.mycompany.com/Microsoft-System-ActiveSync it gives me error unable to connect to remote server, the connected party did not respond after a period of time because connected server failed to respond 67.57.66.23:443
From outside owa and activesync is working but my outlook 2007 SP2 shows disconnect every 25 minutes and then connected again when i see windows evenyviewer i am getting error that CAS Server failed to connect to mailbox server. Later it disconnected for
60 seconds, I think thats when outlook gives disconnect error to all users
Your quick help is really appreciatedHi,
Hope below KB will help you for resolution the issue
http://support.microsoft.com/kb/2469722
http://www.wiki-errors.com/err.php?wiki=443
Dinesh S. -
Adobe Exchange Panel Update not working?
Hello:
My OS is Windows 7 64 bit and I have Ps and Ia installed on my laptop.
I downloaded and installed the Adobe Exchange roughly two months ago and everything worked great at first.
I installed a few things such as the Paper Textures and a game Level Up (can't recall the others at the moment).
The game worked three times but then it just stopped responding. I never had an issue with the other extensions.
Yesterday I went to try out the game again but when i opened the Exchange panel it said there was a new update and so i (sadly) opted to click 'Update'
After clicking the update button I received a message:
Also, Norton said the link or what have ya was NOT trusted and is Unknown. So, I clicked on the Norton message and got this info:
Heuristic virus? um, what?
http://www.pctools.com/security-news/heuristic-virus-definition/
I went ahead and Removed all the extensions I had downloaded/installed from the Exchange panel but I would very much like to be able to use them again.
Any ideas as to the issue? Is there a solution?
I have shut off Norton to see if that would work but I still get the above message "... valid signature ... "
Sure would appreciate some input.
Thank you in advance
ps. could the Heuristic virus detection be a False Positive?Hello:
You are totally misunderstanding me. I have Windows 7 64 bit and I did have the Exchange Panel already installed. When I went to use the Exchange PanelIT had an update. I didNOT update to Windows 8.
I clicked on the UPDATE IN the Exchange Panel which is what would NOT install because NORTON said it IS MALWARE.
I tried to update the Exchange Panel and NOT my operating system.
The attempt to Update the Exchange Panel caused the older version of the Exchange Panel to not work. So, I had to Uninstall the Exchange Panel and then when I went to Reinstall the Exchange Panel it would NOT install. And now I cannot use it at all.
Again, I DO have Windows 7 and NOT Windows 8.
Please, I would very much like to be able to use the Exchange Panel again because I would like to install some extensions, let me know when this issue is resolved.
Thank You,
Kara A. Rowe
[email protected] -
Exporting from PDF to Word 2010 is not working in Acrobat 8
Exporting from PDF to Word 2010 is not working in Acrobat 8. I'm getting the following errors/messages. Any suggestions?
The instruction at “0x29034c05” referenced memory at “0x0000030”. The memory could not be “written”.
Click OK to terminate the program
Click onCANCEL to debug the program
Runtime Error!
Program: C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe
R6025
-pure virtual function callNot supported by Acrobat 8. Supported by Acrobat X.
Be well... -
Drill down report not working in 1og report
hi all,
Drill down report not working in 1og.
in 6i it working good but 10g not working .
plz help any one.
thanksHello,
For detailled instructions about hyperlinks :
Oracle® Reports Building Reports
10g Release 2 (10.1.2)
B13895-01
3.6.10.1.8 Creating a hyperlink using the Property Inspector
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_howto.htm#i1062802
Regards -
Hi,
We have LYNC 2013 and Monitoring is enabled. the CDR report is not working. even User Activity summary for telconferencing and for audio, reports not working.
Kindly suggest troubleshooting steps.
Can we have any SQL query to fetch the report from database?
Thanks
jitenderHi Raju,
From Monitoring server , CDR report is not working. Even "User Activity Report" not working and giving below error for "Telephony Conference" and as well for "A/V Conference"
" No results match the report filters. Change the filter values and submit the query again."
Thanks
jitender -
IPS event monitor and reports not working
Dear after upgrading my IPS from E3 to E4 the event monitor and reports not working, can you please advice my to solve this issues
Hi All,
Filter settings below:
The filter works partially as I don't get alerts on the IPS itself.
Firewall LOG:
4 Feb 14 2014 15:33:22 39715 514 IPS requested to drop UDP packet from SOURCE_VLAN_NUMBER:/39715 to DESTINATION_VLAN_NUMBER:/514
IPS LOG (when enabled):
evIdsAlert: eventId=1352793300955167909 vendor=Cisco severity=low
originator:
hostId: SSM02
appName: sensorApp
appInstanceId: 1192
time: Feb 14, 2014 15:33:22 UTC offset=0 timeZone=GMT00:00
signature: description=IP Fragment Too Small id=1206 version=S212 type=anomaly created=20030801
subsigId: 0
sigDetails: Too many small IP fragments in datagram
interfaceGroup: vs0
vlan: 0
participants:
attacker:
addr: 172.x.x.x locality=OUT
port: 39715
target:
addr: x.x.x.x locality=OUT
port: 514
os: idSource=unknown type=unknown relevance=relevant
alertDetails: InterfaceAttributes: context="single_vf" physical="Unknown" backplane="GigabitEthernet0/1" ;
riskRatingValue: 50 targetValueRating=medium attackRelevanceRating=relevant
threatRatingValue: 50
interface: GigabitEthernet0/1 context=single_vf physical=Unknown backplane=GigabitEthernet0/1
protocol: udp
Our next step is to make a service policy exception on the firewall itself. We are also considering reloading the IPS device or at least the analysis engine.
Thanks for all your help so far. Any more suggestions are most welcome. I'll keep you up to date.
Regards
Mariusz -
Incorrect Report duration in CAS Exchange 2010 Reports
Hi ,
We are facing issues in our Exchange 2010 reports where Reports are coming blank. We had an DWH aggregation issue in the past with the Exchange dataset. With the help of Microsoft we had caught up the aggregation manually. Post that the Exchange reports are
coming blank.
What could be done to fix the issue.
Regards,
JestyFirst go to the event viewer, Application, Operations Manager and look if errors related to the Exchange Reports are raised. Verify that you enable rules.
For empty Exchange 2010 Server Statistics/Mailflow Reports
http://blogs.technet.com/b/emreguclu/archive/2011/09/26/empty-exchange-2010-server-statistics-mailflow-reports-if-default-log-directory-has-changed.aspx
http://www.dario.co.il/?p=968
Also you can check below link for blank reports
http://support.microsoft.com/kb/2573329
Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
Mai Ali | My blog: Technical | Twitter:
Mai Ali -
Exchange 2010 calendar not showing on outlook 11 Mac
Exchange 2010 calendar not showing on Outlook 11 Mac on my iMac. It shows fine on iPhone and OWA.
Since this question is about a Microsoft product, you might have more luck getting suggestions if you ask in Microsoft's own forums.
Regards.
Maybe you are looking for
-
Issue: One day I unplug the power, the screen freezes and I get frozen music sound. I shut down, start up, I get 3 beeps (1 short 2 long), which indicates a Video failure according to the Thinkpad Laptop beep code list. How I solve the issue day-to-d
-
On the face of it, when first told it looked a simple requirement : There is a single push - to - on hardware switch which is read by a DAQMX read function as a digital input inside of a 50ms timed loop. Every time the user pushes the switch momenta
-
Mac OS X 10.9.4 - Entire CC Ent edition installed to boot drive
I have a Mac running OS X 10.9.4. I too selected my destination to NOT be my boot drive as it is a SATA LIF SSD drive that can NOT be upgraded. I installed the entire CC ENT collection and the installer put EVERYTHING to my boot drive. not a singl
-
I started a drawing in CS4 and currently working on it in CS5 which is why I'm wondering its the reason why I'm getting this issue. My issue is that my layers are locking sort of. Like if I place a colour on the layer I cant place a colour ontop of t
-
Keep getting prompted for different iTunes accounts
When attempting to update the apps on my 4S, iTunes alternately asks me for the password for two different iTunes accounts: the original one I created for my boyfriend's iPod, then the one I set up for use with my iPhone. How can I keep it from doing