Kaseya Community

Notification Policy Agent Procedure

  • Anyone know if there's a way to modify the notification policy via a script?  I'd love to add it to the machine quick view in order to turn the notification to silently take control and then back to notify when we've gotten permission to get on and no one is around the computer.  Of coarse we could change it in the remote module and we do have a policy that we have the behavior we want set as the standard but someway to add it to an agent procedure to quiclky toggle would be great.

  • Hi  

    This is possible but to warn you now, it will involve using SQL update statements against your database every time this procedure runs.

    I went ahead and created some SQLWrites and 2 Agent Procedures to do this, which seems to get the job done.

    All these SQLWrites do is update the table dbo.rcNotifyPolicy to change the status of column 'RemoteControlNotify' from '1' to '2' or '2' to '1'.

    Enable RC Notificatoin SQL Write command: 

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

    <queryList>

        <queryDef label="EnableRCNotify" sql="update rcNotifyPolicy set remoteControlNotify = '2' where agentguid = #vMachine.AgentGuid#"/>

    </queryList>

    Disable RC Notification SQL Write command:

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

    <queryList>

        <queryDef label="RemoveRCNotify" sql="update rcNotifyPolicy set remoteControlNotify = '1' where agentguid = #vMachine.AgentGuid#"/>

    </queryList>

    These two will either disable or enable the Notification for Remote Control sessions.

    I created two separate SQLWrite and two separate procedures to either Disable or Enable.

    You can add both of these procedures once built, in the Quick View function.

    Here is the direct link to the files I created for you to review and compare:

    https://dl.dropboxusercontent.com/u/58075471/KUStuff/Community/RCNotifyProcedure.zip

    I strongly, strongly recommend you test this on a few machines before you put into production to ensure it achieves your specific end goal.

    If you want to alter the SQLWrites further here is the values for this column in the rcNotifyPolicy table:

    1 -> take remote control silently

    2 -> notify user remote control is happening.

    3 -> ask user’s permission before taking remote control.

    4 -> require permission. Denied if no one is logged in.

    Let me know if you have any issues.

  • Nicolas, thanks man!  This is great info.  I'll take a look and do some testing.