Instructions to uninstall Sophos Endpoint using Group Policy on Windows Server

1. Purpose of the article

This article will guide you how to deploy Sophos Endpoint software with Group Policy, this method is often applied to uninstall multiple computers at the same time and does not affect the user.

2. Network diagram, configuration scenario and steps to be taken

2.1 Network diagram

The network map has the following components:

  • Sophos XG devices will connect to the internet via static ip 113.171.48.21.
  • The Sophos XG device is a DHCP provider with the network layer 172.16.16.0/24 and the LAN port ip address being 172.16.16.16/24.
  • Under the Sophos XG device is a server domain controller named dc01.testlab.vn with ip 172.16.16.100/24 ​​and a PC that has been john domain named Client1.testlab.vn, has ip 172.16.16.101/24, currently importing domain account is michael in OU IT and having Sophos Endpoint installed.

2.2 Scenario

We will perform the configuration to remove the Sophos Endpoint software on the Client01 machine by creating a Group Policy on the Windows Server DC01 machine and applying that policy to the Client01 machine.

2.3 What to do ?

  • Create a share folder on Windows Server.
  • Prepare scripts to remove Sophos Endpoint.
  • Create group policy.

3. Configuration

3.1 Create a share folder on Windows Server

The first step we need to do is to create a share folder to contain the scripts file that can be used to remove the sophos endpoint so that workstations can access to execute the scripts file.

Here we will create a folder called Share on drive C of the windows server machine.

Next we will perform the configuration to share this folder by right clicking on the folder> selecting Propertise> Sharing> Advanced Sharing …> Click Share this folder> Permission> check Allow at Full Control and click OK to close tabs.

3.2 Prepare scripts to remove Sophos Endpoint

We need to prepare a script to automatically uninstall sophos endpoint implicitly without affecting the user.

We create a text file named SophosUninstall, open it and copy the following scripts to the text file and save it in the Share folder.

After creating the SophosInstall text file, the SophosUninstall file now has a .txt extension.

To convert to a .bat file, we right click on the file> select Remane and modify the file extension from .txt to .bat.

Note if you choose Remane but the file extension does not appear for you to edit you need to do the following.

On the Share folder in the toolbar, select the View tab and check the box File name extension.

3.3 Create Group Policy

Before creating the policy we need to note that this policy is only applicable to non-user devices, so we need to move the device of the Client1 machine to the IT OU where we are applying the policy.

To switch your device open Server Manager> select Tools> Active Directory Users and Computers, the Active Directory Users and Computers table appears.

Pay attention to the OU Computer section, this is the place where the devices have been john domain.

To move these devices to the desired OU you just need to drag and drop them into the OU you moved, in this article I will move it to an IT OU.

To create a gourp policy we need to access the Group Policy Management.

To access them type Administrative in the Windows search box> select Windows Administrative Tool> select Group Policy Management.

Next go to Group Policy Management> Forest: testlab.vn> Domains> testlab.vn.

Here we will create a policy for the IT OU to create a right click on the IT OU and select Create a GPO in this domain, and Link it here…

Name the policy SophosUninstall and click OK.

After the SophosUninstall policy is created, right-click on it and choose Edit.

The Group Policy Management panel appears, accessed by the path SophosUninstall [DC01.TESTLAB.VN]> Computer Configuration> Policies> Windows Settings> Scripts (Startup / Shutdown) and double-click on Startup in the right panel.

Now the Startup Propertise panel appears, click on Show Files, at this time the Startup folder appears where the scripts will be executed, we need to copy the prepared SophosUninstall.bat scripts file into this directory.

Go back to the Startup Propertise panel, select Add> select SophosUninstall.bat and click OK to save.

Back in the Group Policy Management panel, right-click on the IT OU where the SophosUninstall policy is located and select Group Policy Update.

The Force Group Policy Update panel appears, click Yes to update the policy for the device and wait 3 seconds to complete.

When finished click Close to close the window.

Next we will go to the Client1 machine, type in the windows cmd search bar to turn on the Command Prompt.

Type the command gpupdate / force and press Enter to execute, wait about 3 seconds to complete and restart the computer for the computer to install Sophos.

Wait 10-15 to finish uninstalling Sophos Endpoint.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.