Authorize Users

Squadra.secRMM.AuthorizeUsers (Task)

This opsmgr agent task allows you to set the secRMM "AllowedUsers" property. The secRMM AllowedUsers property tells secRMM who has the authority to write to a Removable Media Device. The secRMM AllowedUsers property can also be used to completely disallow use of Removable Media (same functionality as the secRMM Lockdown agent task). This is accomplished by specifying a value that will never match any userid within your environment. The value of the secRMM AllowedUsers property is a semicolon separated list of userids. The format of the userids is domainName\userid

Element properties:

TargetSquadra.secRMM.Event
AccessibilityInternal
CategorySecurityHealth
EnabledTrue
RemotableFalse
Timeout300

Member Modules:

ID Module Type TypeId RunAs 
Microsoft.Windows.ScriptWriteAction WriteAction Microsoft.Windows.ScriptWriteAction Default

Source Code:

<Task ID="Squadra.secRMM.AuthorizeUsers" Accessibility="Internal" Enabled="true" Target="Squadra.secRMM.Event" Timeout="300" Remotable="true">
<Category>SecurityHealth</Category>
<WriteAction ID="Microsoft.Windows.ScriptWriteAction" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>SetAllowedUsers.vbs</ScriptName>
<Arguments>Null</Arguments>
<ScriptBody><Script>
Option Explicit
SetLocale("en-us")
Dim objArgs
Dim objSecRMM
Set objArgs = WScript.Arguments
Set objSecRMM = CreateObject("secRMMInterface")
If (objArgs(0) = "Null") Then
objSecRMM.SetProperty "AllowedUsers", Null
WScript.Echo "secRMM Property AllowedUsers has been cleared"
Else
objSecRMM.SetProperty "AllowedUsers", objArgs(0)
WScript.Echo "secRMM Property AllowedUsers has been set"
End If
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</Task>