Browse Community
Help
Log In
Responses(15)
Solutions(0)
Julien_K
21 Posts
1
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
3ksuresh
16 Posts
0
June 13th, 2017 06:00
could you please share the script to my Id 3ksuresh@gmail.com
Raj-Jalli
8 Posts
June 13th, 2017 09:00
please share to me as well
rjallidocs@gmail.com
Sherin_George
3 Posts
June 13th, 2017 21:00
Hi Julien,
Kindly send the script to write2sheringeorge@outlook.com
Thanks in Advance..
June 14th, 2017 00:00
Email sent
Karthik_N1
25 Posts
I would like to have a look at the script, please send it across to me:
kar26107@gmail.com
Thanks,
Karthik N
Ovi_I
1 Message
June 14th, 2017 03:00
Hi,
Please send to ovi789@gmail.com too.
Thank you
June 14th, 2017 05:00
done
latour1
June 19th, 2017 12:00
I would love a copy of the script.
chad.latour@gmail.com
Thank you!
June 20th, 2017 02:00
ble1
4 Operator
•
14.3K Posts
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
Julien wrote:
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
stevenlai1
June 21st, 2017 14:00
Could you please also share the script to my email address sblai2@gmail.com
Thank!
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 )
$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"
zahidashrafece
June 20th, 2019 07:00
please send the script on
vidhi_23
July 5th, 2021 09:00
Hey
How to pass username and password in encrypted form not in plain text.
$gstclrpt -u $user -P $pwd
Dell Support Resources
View All
Top
Julien_K
21 Posts
1
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
3ksuresh
16 Posts
0
June 13th, 2017 06:00
could you please share the script to my Id 3ksuresh@gmail.com
Raj-Jalli
8 Posts
0
June 13th, 2017 09:00
please share to me as well
rjallidocs@gmail.com
Sherin_George
3 Posts
0
June 13th, 2017 21:00
Hi Julien,
Kindly send the script to write2sheringeorge@outlook.com
Thanks in Advance..
Julien_K
21 Posts
0
June 14th, 2017 00:00
Email sent
Karthik_N1
25 Posts
0
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
Ovi_I
1 Message
0
June 14th, 2017 03:00
Hi,
Please send to ovi789@gmail.com too.
Thank you
Julien_K
21 Posts
0
June 14th, 2017 05:00
done
latour1
1 Message
0
June 19th, 2017 12:00
I would love a copy of the script.
chad.latour@gmail.com
Thank you!
3ksuresh
16 Posts
0
June 20th, 2017 02:00
could you please share the script to my Id 3ksuresh@gmail.com
ble1
4 Operator
•
14.3K Posts
0
June 20th, 2017 02:00
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
stevenlai1
1 Message
0
June 21st, 2017 14:00
Could you please also share the script to my email address sblai2@gmail.com
Thank!
Julien_K
21 Posts
1
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"
}
zahidashrafece
1 Message
0
June 20th, 2019 07:00
please send the script on
vidhi_23
1 Message
0
July 5th, 2021 09:00
Hey
How to pass username and password in encrypted form not in plain text.
$gstclrpt -u $user -P $pwd