Kaseya Community

Stolen laptop - Script to report public IP?

This question is not answered

Is there a WMI script, or any way I can use Kaseya to report the public IP to the Kaseya Server (using Get File or whatever) on agent check in?

This way if a tablet PC or laptop gets stolen I can give the public IP information to the police or what not.




All Replies
  • Check the old forums as I know that Ben LaValle has done a lot of scripts dealing with stolen laptops

  • Today I feel nice, but lazy...

    This one will email you when the machine goes online.

    <?xml version="1.0" encoding="utf-8"?>

    <ScriptExport xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns="www.kaseya.com/.../Scripting">

     <Procedure name="Agent Online email" treePres="3">

       <Body description="Reports the machine name/groupID and external IP of target machine.">

         <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false">

           <Parameter xsi:type="EnumParameter" name="VariableType" value="Prompt" />

           <Parameter xsi:type="StringParameter" name="SourceContent" value="Email User" />

           <Parameter xsi:type="StringParameter" name="VariableName" value="emailUser" />


         <Statement description="" name="SendEmail" continueOnFail="false">

           <Parameter xsi:type="StringParameter" name="To" value="#emailUser#" />

           <Parameter xsi:type="StringParameter" name="Subject" value="Stolen Agent Online Alert" />

           <Parameter xsi:type="StringParameter" name="Body" value="#vMachine.Machine_GroupID# online on gateway #vMachine.ConnectionGatewayIp#" />





  • Everytime I try to paste the script in you sent me, Kaseya says "There is an error in the XML document".

    Help a newb man, c'mon. Help a newb.

  • I can't visit the old Kaseya forums. When I register it gives me the confirmation but never the confirmation e-mail.

  • THe line that starts with "<ScriptExport xmlns:xsi" needs to be edited.. pull it from one of your scripts...

  • You don't need a script for the online alert. Go to Monitor tab, then Alerts, then Agent Status.

    You also don't need a script to get the public IP. It's already in Kaseya on the Agent tab under Connection Gateway.

    If the laptop has a webcam, slap a script on there that will take pictures of the perp.

  • files.kaseya.com/.../stolen_laptop.zip

    Import the XML this contains via Agent Procedures -> Import Folder/Procedure. Enjoy :)

  • @Ben Thanks for sharing :))

  • Awesome guys, thanks Ben. Amazing stuff. Ok, now I have another noob question. How can I get this procedure to run automatically at the next check in? And also, a simultaneous alert would be nice.

    Thank you guys!

    [edited by: aabbasi at 11:18 PM (GMT -8) on 11-14-2010] typo
  • I'm not understanding why you need a script here.

    In the Agent tab, Agent status, your can set a column (if it's not already visible by default) and just look at the "Connection Gateway".

    If the machine is online, it will show it's current public ip address.  If the machine is offline, it will show the last known public IP address.

    But, if you want to script this for alerting, use Ben's script.  To have that script trigger automatically when the agent goes online, goto the Monitor tab, select Alerts.  Select alert function of "Agent Status".  Choose run script and check "alert when agent goes online"

  • Thanks Dan, I did not know that the last known connection gateway would be saved. Also your alert information helped, thank you.

  • You can use following procedure to get check in alerts from specific or multiple machines....

    Montior->click alert tab> change alert type to be "agent status" >>select machine>>select email alert and use email address which should get alert >> below that check appropriate boxes to get type of alerts.

    But if it is already stolen and kaseya aget still there on the machine you can know the public IP by going to (Audit>>machine info) get public IP and use dnsstuff.com or certain tools to get the location of IP.

  • When I click on script I can only choose 1 feature...ie. Collect IP info ,  I can't choose them all....why?

    Thanks in advance.

  • We had this problem with a user losing their laptop and my plan was to use the gateway IP once the laptop next came online.

    I just used a monitor alert to send an email when that particular machine came online again so I could go and quickly check the ip of the device...

  • Whe I try to access the screen caps, audio and video in the Documents tab, I am told "Your login does not have rights to view this page".  My user has all rights.  

    Anyone know why that is happening?