21 Posts

June 13th, 2017 05:00

Hello,

i've just finished a reporting script for some specific policies.

give me your email, i will share it with you.

Julien

16 Posts

June 13th, 2017 06:00

could you please share the script to  my Id 3ksuresh@gmail.com

8 Posts

June 13th, 2017 09:00

please share to me as well

rjallidocs@gmail.com

June 13th, 2017 21:00

Hi Julien,

Kindly send the script to  write2sheringeorge@outlook.com

Thanks in Advance..

21 Posts

June 14th, 2017 00:00

Email sent

25 Posts

June 14th, 2017 00:00

I would like to have a look at the script, please send it across to me:

kar26107@gmail.com

Thanks,

Karthik N

1 Message

June 14th, 2017 03:00

Hi,

Please send to ovi789@gmail.com too.

Thank you

21 Posts

June 14th, 2017 05:00

done

1 Message

June 19th, 2017 12:00

I would love a copy of the script.

chad.latour@gmail.com

Thank you!

16 Posts

June 20th, 2017 02:00

could you please share the script to  my Id 3ksuresh@gmail.com

4 Operator

 • 

14.3K Posts

June 20th, 2017 02:00

Julien wrote:

Hello,

i've just finished a reporting script for some specific policies.

give me your email, i will share it with you.

Julien

It might be good idea to attach it to this thread as otherwise:

a) people will continue to ask this

b) by placing their email here there is risk that some web crawler will pick it up and then you end up with tones of spam

1 Message

June 21st, 2017 14:00

Could you please also share the script to my email address sblai2@gmail.com

Thank!

21 Posts

June 26th, 2017 06:00

<#

NetWorker Daily Status Report

nw_daily_rpt.ps1

#>

### vars

$ver="0.1"

$date = Get-Date -Format D

## customer info

$cust="Customer Name"

$site="Site"

$nwsvr="Networker Server"

## nmc crdentials

$user="Report user"

$pwd="Report password!"

## where to store report files

$reportstore="D:\" #-> Where the report file will be stored

## mail settings

$smtprelay="smtp server"

$smtpport="25"

$domain="domain.company.com"

$from="${nwsvr}@${domain}" #email adress of NW server server@yourcompanydomain.com

$to=" "

$cc=""

# smtp credentials (if auth is required)

$smtpuser = "${nwsvr}@${domain}"

$smtppwd = "password"

## report gen vars

# note: JAVA_HOME must be set in gstclreport.bat script

$gstclrpt="C:\Program Files\EMC NetWorker\Management\GST\bin\gstclreport.bat" #default location of gstclreport.bat

$rptformat="csv" # export format of the gtsclreport

$now =  get-date -uformat "%Y-%m-%d_%H-%M-%S"

$rpt="/Reports/Policy Statistics/Workflow Details" #NMC -> Reports -> follow the available reports (Policy Statistics/Group Summary, ...)

$rpttmp="test" # Name of your file

$htmlout="${reportstore}${nwsvr}_Daily_Status_${now}.html" #Name of the html converted file

$policy="Policy1,Policy2,Policy3,..." #specify policies details or workflows names...

$status="successful"

"Begin Report Script"

try

{

# generate csv report

#write-host "$gstclrpt -u $user -P $pwd -r `"$rpt`" -x $rptformat -o landscape -f `"$reportstore$rpttmp`" -C "save time" "1 day"

& $gstclrpt -u $user -P $pwd -r "$rpt" -x $rptformat -o landscape -f "$reportstore$rpttmp" -C "Policy Name" "Policy1,Policy2,Policy3,..." #** or $policy ** -C "Server Name" $nwsvr

### convert csv to html

# html report format

$title = "$nwsvr Daily Backup Report"

$style = @"

"@

$rpthead = @"

Customer:  $cust

Site:  $site

NetWorker Server:  $nwsvr

Report Date:  $date

"@

#write-host "Get-Content "$reportstore$rpttmp.csv" | select -skip 50 | ConvertFrom-Csv | ConvertTo-Html -head $style | Out-File $htmlout"

Get-Content "$reportstore$rpttmp.csv" | select -skip 7 | Sort-Object -Descending | ConvertFrom-Csv | ConvertTo-Html -title $title -head $style -body $rpthead | Out-File $htmlout

<#

## email report for powershell < ver 2

$emailMessage = New-Object System.Net.Mail.MailMessage( $from , $to )

$date = Get-Date -Format D

$emailMessage.Subject = " $nwsvr Daily Backup Report - " + $date

$emailMessage.IsBodyHtml = $true

$emailMessage.Body= (Get-Content $htmlout )

$body = (Get-Content $htmlout )

$SMTPClient = New-Object System.Net.Mail.SmtpClient( $smtprelay , $smtpport )

$SMTPClient.EnableSsl = $false

## uncomment the following line if smtp auth is required

#$SMTPClient.Credentials = New-Object System.Net.NetworkCredential( $smtpuser , $smtppwd );

$SMTPClient.Send( $emailMessage )

#>

## email report for powershell >= ver 2

$subject = " $cust - $site - $nwsvr VmWare Protection Policies Weekly Report - " + $date

$body = (Get-Content $htmlout | out-string)

send-mailmessage -from $from -to $to -subject $subject -body $body -bodyashtml -smtpserver $smtprelay

}

catch [system.exception]

{

"caught a system exception"

}

finally

{

"Report Script Complete"

}

June 20th, 2019 07:00

please send the script on 

1 Message

July 5th, 2021 09:00

Hey

How to pass username and password in encrypted form not in plain text.

$gstclrpt -u $user -P $pwd

No Events found!

Top