4 users responded in this post

Subscribe to this post comment rss or trackback url
User Gravatar
danovich said in May 13th, 2011 at 2:15 pm

My friend and scripting king Tao Yang (http://blog.tyang.org/) has rewritten the code to make it easier to changes variable:

$URL = “http://SERVERURL/SMSReporting_000/Report.asp?ReportID=68&variable=4.00.6487.2157&type=1″
$SMTPServer = “mail.domain.com”
$sendername = “SCCM”
$senderAddress = “Sccm@domain.com”
$Recipient = “user@domain.com”
$strSubject = “Test”

$ie = new-object -comobject InternetExplorer.Application
$ie.navigate($URL)
While ($ie.Busy)
{ Start-Sleep -Milliseconds 400 }
$doc = $ie.document
$strbody = $doc.body.outerhtml
$ie.quit()
$Sender = “`”$SenderName`” `”
$msg = new-Object -comobject “CDO.Message”;
$msg.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
$msg.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = $SMTPServer
$msg.Configuration.Fields.item(“http://schemas.microsoft.com/cdo/configuration/smtpauthenticate”) = 2
$msg.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = 25
$msg.Configuration.Fields.Update()
$msg.From = $Sender
$msg.To = $Recipient
$msg.Subject = $strSubject
$msg.HTMLBody = $strbody
$msg.Send()

GD Star Rating
a WordPress rating system
User Gravatar
JerFlip said in June 20th, 2011 at 10:42 pm

I get an invalid character on line 1.

GD Star Rating
a WordPress rating system
User Gravatar
danovich said in June 28th, 2011 at 9:13 am

When you are doing what? More information?

GD Star Rating
a WordPress rating system
User Gravatar
ucrajee said in June 4th, 2012 at 6:41 pm

hi danovich,
Is there a way to find all SRS scheduled reports details such as(schdeule time, mail IDs configured, etc.)? Pls help as we have many reports scheduled and manual work will take very long time..

GD Star Rating
a WordPress rating system
Leave A Reply

 Username (Required)

 Email Address (Remains Private)

 Website (Optional)