1.     Select START, All Programs, Blue Quality Studios, psIMAlert, psIMAlert Examples

2.     At the prompt enter: .\ 1-SimpleTarget.ps1

3.     To the question of which template enter:  4

4.     To the question of which target enter the login Id of an AD account.

5.     To the question of message text press enter to accept the default text.

6.     To the question of subject line press enter to accept the default text.

7.     To the question of sender press enter to accept the default account or enter a SIP URI.

8.     The Powershell® script is generated, displayed and executed.

 

 

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Program Files\Blue Quality Studios\psIMAlert\Examples>  .\1-SimpleTarget.ps1        

psIMAlert Examples        

# Single Target Script Generator
#
.\Examples\1-SingleTaget.ps1
#
#
More examples at http://www.BlueQualityStudios.com.au/s01/psIMAlertExamples.html

PS C:\Program Files\Blue Quality Studios\psIMAlert\Examples> .\1-SimpleTarget.ps
1
psIMAlert Single Target Script Generator

# Select one of the message styles/template.
# 1-Email Outage, 2-IM Outage, 3-Test, 4-Announcement 004
Message Template [4-Announcement 004]: 4
# Select the recipient(s) by provided a Target Id.
# A target Id can be the id of an AD group or single AD account.
#
# The target id can be a SIP URI, email address, Login Id or Display Name.
# If a group id then all members (including nested members) will be recipients.
Enter Single Target Id: fredN
# Enter the text of the message.
Message Text [Test Message]:
# Enter the Subject Line of the message
Subject Line [Test Message]:
# Enter the URI of the Sender
# The sender should be a resource account that is not normally logged on
Sender [
 <script language='JavaScript' type='text/javascript'>
 <!--
 var prefix = 'mailto:';
 var suffix = '';
 var attribs = '';
 var path = 'hr' + 'ef' + '=';
 var addy25838 = 'imAlerts' + '@';
 addy25838 = addy25838 + 'bqs' + '.' + 'com' + '.' + 'au';
 document.write( '<a ' + path + '\'' + prefix + addy25838 + suffix + '\'' + attribs + '>' );
 document.write( addy25838 );
 document.write( '<\/a>' );
 //-->
 </script><script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '<span style=\'display: none;\'>' );
 //-->
 </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 <script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '</' );
 document.write( 'span>' );
 //-->
 </script>]:
# The powershell command generated is:
Send-Alert -Identity fredN -SubjectLine "Test Message" -Priority Urgent -Messa
geHtmlTemplateFName "Annoucement004" -HtmlMessageText "Test Message" -From 
 <script language='JavaScript' type='text/javascript'>
 <!--
 var prefix = 'mailto:';
 var suffix = '';
 var attribs = '';
 var path = 'hr' + 'ef' + '=';
 var addy98534 = 'imAlerts' + '@';
 addy98534 = addy98534 + 'bqs' + '.' + 'com' + '.' + 'au';
 document.write( '<a ' + path + '\'' + prefix + addy98534 + suffix + '\'' + attribs + '>' );
 document.write( addy98534 );
 document.write( '<\/a>' );
 //-->
 </script><script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '<span style=\'display: none;\'>' );
 //-->
 </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 <script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '</' );
 document.write( 'span>' );
 //-->
 </script>
# Executing the command

Datetime             ResponseCode Uri
--------             ------------ ---
1/02/2011 3:07:38 PM            0 sip:
 <script language='JavaScript' type='text/javascript'>
 <!--
 var prefix = 'mailto:';
 var suffix = '';
 var attribs = '';
 var path = 'hr' + 'ef' + '=';
 var addy75174 = 'fred.natzke' + '@';
 addy75174 = addy75174 + 'bqs' + '.' + 'com' + '.' + 'au';
 document.write( '<a ' + path + '\'' + prefix + addy75174 + suffix + '\'' + attribs + '>' );
 document.write( addy75174 );
 document.write( '<\/a>' );
 //-->
 </script><script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '<span style=\'display: none;\'>' );
 //-->
 </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it
 <script language='JavaScript' type='text/javascript'>
 <!--
 document.write( '</' );
 document.write( 'span>' );
 //-->
 </script>

PS C:\Program Files\Blue Quality Studios\psIMAlert\Examples>