Envoyer des notifications systèmes ou applicatives vers un iPhone, c’est possible


Il est possible d’envoyer des notifications d’un événement vers un iPhone via un script PowerShell. On peut également y associer un niveau (critique par exemple) et un son différent selon la nature de l’alerte. Il est nécessaire pour cela d’acheter l’application Prowl pour iPhone (2,99€), et télécharger un fichier supplémentaire (une DLL) disponible sur CodePlex.

Le script Windows PowerShell est le suivant :

function Send-Prowl
{ 
 param($Description='Default Description', $priority='Normal')

 [Reflection.Assembly]::LoadFile('C:\Prowl\Prowl.dll')

 $prowlclientconfig = New-Object prowl.ProwlClientConfiguration 
 $prowlclientconfig.ApiKeychain ='f8cbb35508d9abc44992e39fd942acb7a0dc3141'
 $prowlclientconfig.ApplicationName = 'PowerShell'
 $prowlclient = New-Object prowl.ProwlClient($prowlclientconfig)
 $prowlnotification = New-Object Prowl.ProwlNotification
 $prowlnotification.Event = 'Alerte'
 $prowlnotification.Priority = $priority
 $prowlnotification.Description = $description
 $prowlclient.PostNotification($prowlnotification)
}

Send-Prowl -Description 'Votre message d'alerte' -priority High

Pour faire fonctionner le script, vous aurez à modifier la valeur de la propriété APIKeyChain, qui est unique et qui représente l’iPhone de destination. Cette information est fournie par Prowl, lors de l’enregistrement de votre iPhone

A propos Arnaud Alcabez

With more than 20 years of experience in computing technologies and 18 years in the world of IT consulting (whose his own company during 9 years - MCT, MCSE, MSS), I have strong and major skills on IT technologies such Exchange, Virtualization, and BPOS/Office365, Cloud strategy and in particular, Microsoft ecosystem. The last 10 years were devoted to growth the MS identification and the business market (large and mid channels) for some French IT companies. Today, as Office365/Exchange Senior Architect at Capgemini, I share my knowledge with internal teams and Capgemini's customers. In parallel, I am acknowledged as a Most Valuable Professional (MVP) since 2003 by Microsoft Corp. I'm a writer for Exchange Magazine in France,the owner and president of the French Exchange Server community (2500 qualified members in September 2008), and one of the five managers on the Exchange Group LinkedIn community. I speak regularly as IT Expert (Level 300/400 sessions) for Microsoft France, for exemple, during the Microsoft Techdays.
Cet article, publié dans Technologies, est tagué , , . Ajoutez ce permalien à vos favoris.