Manual for Module “Operations”

In this article:

Warning

This article is under construction! Please DO NOT use any of the instructions below, yet! You may cause damage to your system. This article will be finished soon.

Hidden Settings

Hidden settings are configurable features that are not available through the standard configuration UI.

These settings have to be set within the Configuration.xml in a text editor.

Tip

Within the hidden settings section XPATH notation is used to give information about the correct location of the setting. Please visit this website in order to get more information on XPATH notation.

Alternative New Computer Popup

In order to change the behaviour of the new computer, hit the “plus” button and add the following XML tag to //sites/site:

1
 <AlternateCreatePopup><![CDATA[javascript: functionXY();]]></AlternateCreatePopup>

Example

You have created a special CMDB class for computer import with the form ID 84. You can open a popup with the built-in javascript function sW:

1
 <AlternateCreatePopup><![CDATA[javascript: sW('v_84_','../Support/TypeView.aspx?PopUp=true&TypeViewId=84',650,500,true);]]></AlternateCreatePopup>
1
 <AlternateCreatePopup><![CDATA[javascript: sW('v_84_','../Support/TypeView.aspx?PopUp=true&TypeViewId=84&Id=NewEntry',650,500,true);]]></AlternateCreatePopup>

Use &Id=NewEntry to create a new entry on the fly. This allows you to directly show actions buttons and saves one click.

Debug Mode

By setting debugmode to true a verbose log is created in app_data directory with more internal process information. Add the following XML tag to //system

1
 <debugLogging>true</debugLogging>

Custom Queries

Custom queries allows to use alternate queries to built up left and right side of the Operations main window.

Add the following XML nodes to //sites/site:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<CustomQueryComputers>
        <CustomQuery filterId="DefaultComputerQuery" filterLabel="All Computers" filterRole="PackWF Admin" UseSIMDB="false"><![CDATA[
          SELECT  resourceid                                         AS Id, '',
          name0                                              AS
          Computer
          ,
          user_domain0 + '\' + user_name0
          AS Username,
          obsolete0                                          AS
          Obsolete
          ,
          active0
          AS Active,
          (SELECT Count(RelationshipResourceID)
          
          
          
          FROM   v_UserMachineRelation
          WHERE  machineresourceid = v_r_system.resourceid) AS
          UserDevice
          ,overall_count = COUNT(*) OVER()
          FROM   v_r_system
          
          where v_r_system.name0 like '%{search}%'
           
          
        order by {orderby}
        
         OFFSET {start} ROWS FETCH NEXT 50 ROWS ONLY
        ]]></CustomQuery>
        <CustomQuery filterId="DefaultUserQuery" filterLabel="All Users" filterRole=""><![CDATA[
         SELECT  top 100 resourceid                                         AS Id, '',
          name0                                              AS
          Computer
          ,
          user_domain0 + '\' + user_name0
          AS Username,
          obsolete0                                          AS
          Obsolete
          ,
          active0
          AS Active,
          (SELECT Count(RelationshipResourceID)
          
          
          
          FROM   v_UserMachineRelation
          WHERE  machineresourceid = v_r_system.resourceid) AS
          UserDevice
          FROM   v_r_system
          
          where v_r_system.name0 like '%{search}%'
          
        order by {orderby}
        ]]></CustomQuery>
      </CustomQueryComputers>
      <CustomQuerySoftware>
        <CustomQuery filterId="DefaultAppQuery" filterLabel="All Applications" filterRole=""><![CDATA[
          select id, '', name, [Description] from (
SELECT '$'+CAST(CI_ConfigurationItems.CI_ID as varchar) as id, DisplayName as name, 


ltrim(SDMPackageDigest.value('declare namespace pd="http://schemas.microsoft.com/SystemCenterConfigurationManager/2009/AppMgmtDigest"; (/pd:AppMgmtDigest/pd:Application/pd:Description)[1]', 'varchar(max)')) AS [Description]



FROM CI_ConfigurationItems INNER JOIN CI_LocalizedProperties ON CI_ConfigurationItems.CI_ID = CI_LocalizedProperties.CI_ID 


WHERE CI_ConfigurationItems.CIType_ID = 10 AND CI_ConfigurationItems.IsHidden = 0 AND CI_ConfigurationItems.IsEnabled = 1 AND CI_ConfigurationItems.IsExpired = 0 AND CI_ConfigurationItems.IsLatest = 1 

)
as t

where t.name like '%{search}%' or [Description] like '%{search}%'
          
        order by {orderby}

        ]]></CustomQuery>
      </CustomQuerySoftware>

Settings

Client Commands

Client commands are visible in the properties dialogue in the SIM OPS module. There are different types of client commands.

../../_images/ComputerActions_001.png ../../_images/ComputerActions_002.png

WMI Query

Executes SQL select on the target machine and displays the output on the website.

Example: View the services of the client including his / her status.

Setting Value
Type WMI query
Namespace root\cimv2
Query SELECT DisplayName, Description, StartMode, StartName, State FROM Win32_Service

Registry Query

Reads from target machine registry and displays the output on the website.

Example: View Add Remove Programs

Setting Value
Type Registry query
Namespace HKEY_LOCAL_MACHINE
Class SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Query DisplayName, DisplayVersion, Publisher, InstallDate

WMI Query Command

Executes a specific WMI method for every returned object.

Example: Stop Windows Services with Specific Name

Setting Value
Type WMI Query command
Namespace root\cimv2
Query select * from Win32_Service where Name=’W3SVC’
Command StopService

WMI Class Command

Executes a WMI class method.

Example: Trigger SCCM HW Inventory on client

Setting Value
Type WMI Class command
Namespace root\ccm
Class SMS_Client
Command TriggerSchedule~{00000000-0000-0000-0000-000000000001}

ClickOnce

Executes local executables such as MSTSC for extended functionality regarding client systems.

Example: Start MSTSC with a Parameter

Setting Value
Type ClickOnce
Query ../Tools/ClickOnce/SIM_Ops_Clickonce.application?{ComputerName}

SIM_Ops_Clickonce.application is only delivered with the latest version. You can change its behaviour (executable, parameters) in the config file under “ToolsClickOnceApplication FilesSIM_Ops_Clickonce_1_0_0_0SIM_Ops_Clickonce.exe.config.deploy”.

Tip

If ClickOnce is missing in your configuration please open the Configuration.xml file and change all lines from

  • “query_wmi,WMI query;query_files,Filesystem;query_registry,Registry query;cmd_query_wmi,WMI query command;cmd_class_wmi,WMI class command;wol,WakeOnLAN”

to

  • “query_wmi,WMI query;query_files,Filesystem;query_registry,Registry query;cmd_query_wmi,WMI query command;cmd_class_wmi,WMI class command;wol,WakeOnLAN;clickonce,ClickOnce”`