Endpoint Protection

 View Only
Expand all | Collapse all

SQL Query to move group in SEPM into another group

  • 1.  SQL Query to move group in SEPM into another group

    Posted Jan 14, 2013 11:22 AM

    Ok, I totally understand that Symantec does not support the use of SQL queries to manage its interface, and it is a "use at your own risk".

    If I want to move one group, into another group in the SEPM (SEP 12 RU2), what is the SQL query for this?

     

    For example, to move a SEP client to a group in SEPM, I simply update the Group ID of the SEP client:

     

    UPDATE SEM_CLIENT
    SET SEM_CLIENT.GROUP_ID = '$Name_of_Group_You_Want_to_Move_SEP_Client_to'
    WHERE SEM_CLIENT.COMPUTER_NAME = '$Computer_Name_of_SEP_Client'
    AND SEM_CLIENT.COMPUTER_ID = '$Computer_ID_of_SEP_Client'

     

    Can you tell me what query to run to move one group into another group. I'm trying this on the test system, of course angel



  • 2.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 14, 2013 11:33 AM

    Out of curiousity, have you checked the MoveClient utility?

    It's found on the DVD under the Tools\NoSupport folder

    Unless of course you want to do this with a SQl query

    How do I move a large number of SEP clients to a new group at once?

    Article:TECH98302  |  Created: 2009-01-29  |  Updated: 2011-11-04  |  Article URL http://www.symantec.com/docs/TECH98302

     



  • 3.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 14, 2013 11:55 AM

    Yes Brian, I checked the MoveClient utility. It proved to be too cumbersome and clunky because all clients you want to move have to go to default group first, before you can run the script.

     

    I created an updated moveclient script custom-made for our environment. This script looks for SEP clients in the SEPM (regardless of what group they are currently in), and will move SEP Clients that are Servers into a Server group, otherwise it will look at IP address and move it to group based on it's IP address.

     

    The script is still a work in progress.



  • 4.  RE: SQL Query to move group in SEPM into another group

    Broadcom Employee
    Posted Jan 21, 2013 12:29 PM

    You can define the group you want the MoveClient script to run against. I've used the script to move over 40,000 endpoins to 200+ groups with multiple domains without issues.



  • 5.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 22, 2013 03:39 PM

    Trey can you can an example of this type of code, or point out where I can do this, i.e. move one group into another group, I'm not talking about individual clients, I am concerned about moving groups.



  • 6.  RE: SQL Query to move group in SEPM into another group

    Broadcom Employee
    Posted Jan 22, 2013 04:30 PM

     

    The first thing I recommend is checking to make sure you have the latest moveclient.vbs script. This should be in the SEP 12.1 RU2 download under the nosupport directory.

    You can set the name of your Temp group in the following line. By default it uses the SEPM default Group Name as seen below.

    Dim TempGroupName : TempGroupName = "Default Group"

     

    The next setting determines if the moveclient.vbs script will process clients from all groups or just from the defined TempGroupName

    Dim OnlyCheckClientsInTempGroup : OnlyCheckClientsInTempGroup = False

    You can't use this to move SEPM group named GroupA to SEPM group named GroupB but you could get creative and use the options available in the script such as IPGroups to move all clients in GroupA to GroupB.

     

    IPgroups.txt
    This file contains a list of IP addresses (IP ranges or IP addresses with subnet notation) and 
    group names separated by a comma.  The script will search for clients with the IP address listed
    and move them to the associated group.  This supports single IP addresses, IP ranges and IP 
    subnet notations.
    Format:
    IP,GroupName
    IP,GroupName,DomainName
    IP,GroupName,DomainName,Description
    Sample text file:
    172.24.20.171,Marketing
    10.0.0.4,Group1
    192.168.0.1-192.168.0.254,Group1\subgroup1
    192.168.0.1/24,Group1\subgroup1
    172.16.0.2,Group2\subgroup1
    207.33.111.27,Group3

    Please always test before making production changes. I cannot recommend changes in your production environment.

     

     



  • 7.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 23, 2013 10:23 AM

    but you could get creative and use the options available in the script such as IPGroups to move all clients in GroupA to GroupB.

     

    Oh Dear, that is not what I was looking for, but thank you anyway frown



  • 8.  RE: SQL Query to move group in SEPM into another group

    Broadcom Employee
    Posted Jan 23, 2013 10:34 AM

    If your only wanting to move one group to another you can use the IPgroups option and define the IP range as 1.0.0.0-255.255.255.255

    This would move all of the clients within the group you set it up to check since all clients would match the IP range.

    Can you give me more details of what your trying to do?



  • 9.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 23, 2013 10:51 AM

    I am trying to move an entire group into another group. Whether the group has clients or not is irrelevant. See picture below:

     

     

    I am trying to move all the blue nodes into the pink node. When I expand the pink node, I want to see all the blue nodes intact.



  • 10.  RE: SQL Query to move group in SEPM into another group

    Broadcom Employee
    Posted Jan 23, 2013 11:29 AM

    Is this a one time process or something that will be ongoing? Are there groups outside of these that you don't want touched? How many "blue groups" do you have?

    If this is a one time move you could set the moveclient script up using my suggestions and after you run it you would only need to change the name of the default group as you move through the groups highlighed in blue.

    If you need something that is ongoing I would have to think of something else.

    What about just highlighting all of the clients in each blue group, right clicking, move to new pink group? I understand you may not want this if this isn't a one time move.

    If it is an ongoing type of process you could set the group to block new clients from joining and they will go to the default group in SEPM and then you could setup the moveclient script to run automatically every 30 minutes and process against that...



  • 11.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 23, 2013 11:46 AM

    Is this a one time process or something that will be ongoing?

    This is a one-time process

     

    What about just highlighting all of the clients in each blue group, right clicking, move to new pink group?

    How to highlight multiple groups at once? If I can do this, problem solved!



  • 12.  RE: SQL Query to move group in SEPM into another group

    Broadcom Employee
    Posted Jan 23, 2013 11:48 AM

    You would basically click on each blue group and repeat the process.

    example.


    Click the first blue group, highlight all clients within that group. Right Click, move to pink group.

    Click the second blue group, highlight all clients within that group. Right Click, move to pink group.

    Click the third group.....

    Repeat as needed



  • 13.  RE: SQL Query to move group in SEPM into another group

    Posted Jan 23, 2013 02:01 PM

    Click the first blue group, highlight all clients within that group. Right Click, move to pink group.

    Click the second blue group, highlight all clients within that group. Right Click, move to pink group.

    Click the third group.....

     

    This is more cumbersome than what I am doing now. For each blue group, I right click, select move, and choose the pink group.

    I was hoping you would explain a way to select all blue groups at once, right click, select move, and choose pink group.

     

    Alas, this is Symantec's trademark  broken heart

    No worries, I appreciate your help though :-)