Set Set oMessage = CreateObject("CDO.Message") > ("") = 2 > ("") = "" > ("") = 1 > ("") = > ("") = "aabbcc112233" > ("") = 25 > ("") = False > ("") = 60 > oMessage.From = > oMessage.To = > oMessage.Subject = "Exchange Server External Mail Client Requests" > oMessage.TextBody = "Here is a list of all of the clients that externally connected to the Exchange Mail Server on %yesterday% to retrieve their mail remotely." > oMessage.AddAttachment %OUTPUT% > oMessage. :: Create send authenticated email VBScript :: Enter your email server information below %APPDIR%\logparser.exe -i:iisw3c %SQL2% -o:csv Set SQL2="SELECT date, time, cs-method, cs-uri-stem, cs-uri-query, s-port, cs-username, c-ip, cs(User-Agent), time-taken INTO %OUTPUT% FROM %LOGFILENAME% WHERE (((NOT SUBSTR(c-ip,0,%CHARLENGTH%)='%LOCALSUBNET%') AND (NOT c-ip='::1')) AND (NOT c-ip='127.0.0.1'))" :: Longer, slightly harder to read verbose report Set SQL1="SELECT date, time, cs-method, s-port, cs-username, c-ip, cs(User-Agent), time-taken INTO %OUTPUT% FROM %LOGFILENAME% WHERE (((NOT SUBSTR(c-ip,0,%CHARLENGTH%)='%LOCALSUBNET%') AND (NOT c-ip='::1')) AND (NOT c-ip='127.0.0.1'))" Apart from this you can also enable tracing in SharePoint by modifying in the web. The IIS logs contain information about each request and the response. The IIS logs presented in C:\Windows\System32\LogFiles location. :: For 10.1.1.0/24 Network -> LOCALSUBNET=10.1.1. IIS logs You can also check in IIS logs for some errors. :: Edit these variables to filter out your internal network from the results Set APPDIR="C:\Program Files (x86)\Log Parser 2.2" Set OUTPUT="C:\external_mail_clients.csv" Activation of C:UsersdxxxxxxxxxxxnDownloadsMicrosoft. Set LOGFILENAME="C:\inetpub\logs\LogFiles\W3SVC1\u_ex%YY%%MM%%DD%.log" Office 365 eDiscovery export tool has an option to divide large PST file i.e. I keep retrieving Applications and empty null argument errors and just can't find a way around to get the virtual directories to list out. :: mail clients to a csv file, and then email it out using a VBScript. 9 I have hit a complete roadblock and cannot figure out how to print out the virtual directories for each website in IIS 8. :: Script to parse yesterday's Exchange IIS log file, export all externally connected Also, for the SQL query to filter out the proper internal networks from the log file, you will have to edit the LOCALSUBNET and CHARLENGTH variables. The only dependency/third party app required is the MS Log Parser executable. I needed a way to track which Exchange users were remotely retrieving their emails outside of the office on their phones and other email clients, so I pieced together this batch/pseudo VB script that can be ran from the Windows Task Scheduler at midnight.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |