SQL Query to move group in SEPM into another group
Created: 14 Jan 2013 | 12 comments
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 ![]()
Discussion Filed Under:
Comments 12 Comments • Jump to latest comment
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?
SEP Knowledge Base
Endpoint SWAT
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.
Marriage Made in Heaven
If God is for us, who can be against us? --- Romans 8:31
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.
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.
Marriage Made in Heaven
If God is for us, who can be against us? --- Romans 8:31
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.
Please always test before making production changes. I cannot recommend changes in your production environment.
Oh Dear, that is not what I was looking for, but thank you anyway
Marriage Made in Heaven
If God is for us, who can be against us? --- Romans 8:31
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?
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.
Marriage Made in Heaven
If God is for us, who can be against us? --- Romans 8:31
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...
This is a one-time process
How to highlight multiple groups at once? If I can do this, problem solved!
Marriage Made in Heaven
If God is for us, who can be against us? --- Romans 8:31
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
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
No worries, I appreciate your help though :-)
Marriage Made in Heaven
If God is for us, who can be against us? --- Romans 8:31
Would you like to reply?
Login or Register to post your comment.