This script is was written to help you keep an eye on you Quest Defender Tokens ( Now Dell ).

 

 

 

#**********************************************************************************
# Created with: SAPIEN Technologies, Inc., PowerShell Studio 2012 v3.0.7
# Created on: 8/22/2013 9:08 AM
# Created by: Darin Torr darintorr@hotmail.com
# Organization: Epsilon
# Filename:Defender_Token_Pecentage.ps1
# Special thanks to : Aidan McCarthy for helping with the percentage setup
#
# Info: PowerShell script to send an email if any Defender License exceeds a defined percentage.
#
#
#
#**********************************************************************************
#
# THIS CODE AND INFORMATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY
# KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
# PARTICULAR PURPOSE.
#
# **********************************************************************************

# PowerShell script to send an email if any Defender License exceeds a defined percentage.

$ErrorActionPreference = “silentlycontinue”

#Get Defender license information
Add-PSSnapin Quest.Defender.AdminTools

$store = Get-DefenderLicense

#extract each row and calculate percentage of license used.
#foreach ($var in $store)
#{
$percent = 0
$licensetype = $store.LicenseType
$userassigned = $store.AssignedUsers
$usertotal = $store.TotalUsers
$tokensfree = ($usertotal-$userassigned)
$percent = $percent + ($userassigned/$usertotal)*100

#determine percentage value of license usage to trigger email (change ’90’ value to percentage you wish to use).
If ($percent -ge 80) { $sendemail++ }

$percent = “{0:N2}” -f ($percent)
#the below message can be edited if required. To do so edit the text between the double quotes.
$body += ,”
$percent percent of license used.
$tokensfree tokens left for distribution.

$licensetype License has $userassigned users assigned.
The total of the license is $usertotal.”
#}

$body

#Send email if any license hits the value specified. Change -From, -To & -SmtpServer settings appropriately to match your environment.
if ($sendemail -ge 1) {
Send-MailMessage -From “Quest Defender <yourserver@yourdomain.com>” -To “youremail@email.com” -Subject “Quest Defender – Daily Token Summary” -Body “$body” -SmtpServer “smtp.server”}

 

## End Script

 

Here is what the email looks like

 

85.81 percent of license used.

1111 tokens left for distribution.

 

Permanent License has 6716 users assigned.

The total of the license is 7827.

 

 

 

Through Agility Harmony, Epsilon is changing the ways digital marketers think about email and cross-channel marketing

You can make a difference in someone life!

We can all give a little. Please help me to help others.

Kiva gives you the chance to make small loans to borrowers working to start businesses and improve their lives. I’m already lending on Kiva and thought you’d like to join me!

-Darin

Link  —  Posted: January 17, 2013 in Cambodia, Missions
Tags: , ,

Christmas Eve Reflections

Posted: December 24, 2012 in Adoption, Fostercare, Orphans
Tags: , , , ,
I SPEAK TO YOU from the depths of eternity Before the world was formed, I AM! You hear me in the depths of your being, where I have taken up residence.I am Christ in you, the hope of Glory. I, your Lord and Savior, am alive within you. Learn to tune into My living Presence by seeking Me in silence.

As you celebrate the wonder of My birth in Bethlehem, celebrate also your rebirth into eternal life. This everlasting gift was the sole purpose of entering your sin-stained world. Receive My gift with awe and humility. Take time to explore the vast dimensions of My Love. Allow thankfulness to flow freely from your heart in response to My glorious gift. Let my Peace rule in your heart, and be thankful.

Psalm 90:2 , Colossians 1:27 and Colossians 3:15

  1. 2, 4 and 6pm at all three campuses
    (Nursery Available Ages 0-4, no children …classes)

    If your unable to attend the service you can watch it via our online campus

    http://cabc.churchonline.org/

    http://crossroadsabc.com/visit/locations/

So I finally got feed up with getting burned by running out of token license’s without having a heads up …..  Quest’s  Defender Report Console (Version 5.6.0.2182) doesn’t have the ability to schedule reports and email them. After searching the web forever and not finding anything I decided to write a powershell script to connect to the quest defender reporting url and parse out the token license info.

Feel free to use and modify.  Enjoy and I hope I saved you some time 🙂

*** Copy Below Here***

#—————————————————————————-
# Author: Darin Torr
#
#
# This script connects to Quest Defender Reporting Console then parses the xml
# to extract token license counts and emails results
#
# Current Version: v1.1
# Version History
#
#
# 5/06/2012 – v1 – Initial Revision.
# 5/06/2012 -v1.1 – Added html and xml file cleanup on report server
#—————————————————————————-

# // Uncomment this to create secure password
#$secureString = Read-Host -AsSecureString
#ConvertFrom-SecureString $secureString | out-file c:\encrypted.txt
#$secure = gc C:\encrypted.txt | ConvertTo-SecureString

# // This is to clean up any old xml and html files from running reports
$reporthtml = “C:\Program Files (x86)\Quest Software\Defender\Defender Report Console\downloads\html\*.html”
$reportxml = “C:\Program Files (x86)\Quest Software\Defender\Defender Report Console\downloads\*.xml”
if (Test-Path $reporthtml)
{
Remove-item $reporthtml
}
if (Test-Path $reportxml)
{
Remove-item $reportxml
}

# // Change to reflect your servername
$url = “http://server/cgi-bin/d5dsslicensereport.exe?mode=0&xsl=d5licensereport.xsl&#8221;
# // create a request
[Net.HttpWebRequest] $req = [Net.WebRequest]::create($url)
$req.Method = “GET”
$req.Timeout = 600000 # = 10 minutes

# // Set if you need a username/password to access the resource
$secure = gc C:\encrypted.txt | ConvertTo-SecureString;
$UserName = “domain\username”;
$req.Credentials = New-Object System.Management.Automation.PSCredential($UserName, $secure);

# // Reading data from page
[Net.HttpWebResponse] $result = $req.GetResponse()
[IO.Stream] $stream = $result.GetResponseStream()
[IO.StreamReader] $reader = New-Object IO.StreamReader($stream)
[string] $output = $reader.readToEnd()
$stream.flush()
$stream.close()
$output | out-null
[xml]$defxml = $output
$final = $defxml.defender_license.desktop_license | select Type,Assigned,Allocation | ConvertTo-Html
function SendMail
{
#Mail Variables
$EmailFrom = “who@ever.com>”
$EmailSubject = “Daily Defender Token Count”
$smtpServer = “relay”
$SendTo = “you@yours.com”
$date = (Get-Date -format “MM-dd-yyyy”)

$mailmessage = New-Object system.net.mail.mailmessage

############## MAIL BODY #############

# Update body with any text you want and variables # #
######################################

$body = “
<lang=EN-US link=blue vlink=purple><div><p>
<span style=font-size:10.0pt;font-family:tahoma,sans-serif;color:#595959>
<dd><p><b>Defender Token count as of $date </b>
<p>
<p><pre style=font-size:10.0pt;font-family:tahoma,sans-serif;color:black> $final <b style=color:red></b></pre>
<p>
</dd></span></b></p>”
#Mail info
$mailmessage.from = $emailfrom
$mailmessage.To.add($sendto)
$mailmessage.Subject = $emailsubject
$mailmessage.Body = $body
$mailmessage.IsBodyHTML = $true
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.Send($mailmessage)

}
SendMail

***End Copy Just Above This***

Here is what your output will look like

Defender Token count as of 06-06-2012 

type assigned allocation
Windows Desktop Token 14075 15000
Palm Desktop Token 0 25
Blackberry Desktop Token 179 7000
Windows Mobile/iPAQ Desktop Token 0 25
SMS Token 0 25
GrIDsure Soft Token 6000 10525
Android Desktop Token 2180 7000
E-mail OTP Desktop Token 0 25

Cambodia 2012

Posted: May 30, 2012 in Cambodia, Missions, Orphans, Uncategorized
Tags:
CambodiaCambodiaCambodiaCambodiaCambodiaCambodia
CambodiaCambodiaCambodiaCambodiaCambodiaCambodia
CambodiaCambodiaCambodiaCambodiaCambodia
CambodiaCambodiaCambodiaCambodiaCambodiaCambodia

Cambodia 2012, a set on Flickr.

My Recent Mission Trip To Cambodia

Check this out. Our good friends over at www.kicksoflove.com is giving away a free pair of kicks to one lucky winner. Just click on the image below and enter while your there “Like” their page!!  Kicks Of Love is a really cool site, all profits are donated to a oprhanage in Cambodia ( www.chchcambodia.com )