• Home
  • About 404TS
  • Contact

404 Tech Support

Where IT Help is Found

  • Articles
    • Code
    • Entertainment
    • Going Green
    • Hardware, Gadgets, and Products
    • Management
    • Network
    • News
    • Operating Systems
    • Security and Privacy
    • Software
    • System Administration
    • Talking Points
    • Tech Solutions
    • Web
    • Webmaster
  • Reviews
  • Media
    • Infographics
    • Videos
  • Tech Events
  • Tools
    • How do I find my IP address?
    • Browser and plugin tests
  • Get a Technical Consultation
You are here: Home / Articles / Software / PowerShell script to update Sophos Endpoint Security and Control policies

PowerShell script to update Sophos Endpoint Security and Control policies

2016-06-14 by Jason

Managing an enterprise organization antivirus with Sophos Endpoint Security and Control, one thing that I have found weird about Sophos is the way that it handles policies. You can use group policies to control a setting on the client. However, if the client changes its configuration away from the settings, for example, removing a scheduled scan or changing any setting without tamper protection enabled, the client will show in the Sophos Enterprise Console as ‘Differs from policy’.

Once the client shows up as ‘Differs from policy’ there are two ways to get the client re-aligned with your preferred settings:

  1. Right-click on the computer in the Sophos console and choose ‘Comply with’ and click ‘all policies’ or one of the other corresponding options that will work for you.
  2. Make a change to the assigned policy, at which point the console will push out the new policy to any clients receiving it.

Beyond that, the console nor the clients automatically enforce compliance with the policies. By enabling tamper protection, you are able to avoid most scenarios with traditional clients.

In one particular scenario, I was working with non-traditional clients of non-persistent VDI clients. These behaved like DeepFreeze computers and refreshed every reboot. This meant that they lost their policies as well. They would update the console and list their status as ‘Differs from policy’.

In order to trigger compliance with the policies, I needed the antivirus client to forget the policies that it had captured in the application layer of the VDI. In order to do that, I was able to use a startup script assigned through Group Policy to accomplish the rough suggestion I got through an old Sophos support thread. Essentially, we needed to stop the Sophos service, empty a folder with the local copies of the policies, and start the service again. Running as a startup script is required because we need this to run as Administrator level. The service to stop is called “Sophos Agent”.

Once the service starts up and realizes that it has no policies, it checks into the console with the status “Awaiting policy from console”. Less than two minutes later for my test system, it checked in again with the status “Same as policy”.

The simple four-line PowerShell script is embedded below.

https://gist.github.com/jhamilton09/58fda5b893daea3dce5570603887054c

Filed Under: Software Tagged With: powershell, sophos

Trending

  • Some tech for your 2012 Holiday Wish List
    In Hardware, Gadgets, and Products
  • Windows Server 2012: Installing Active Directory Users and Computers and Group Policy Management Console
    In Operating Systems, Tech Solutions
  • Western Digital redesigns the My Passport portable hard drive
    In Hardware, Gadgets, and Products

Latest Media Posts

Find Out Where To Download SNES ROMs

Find Out Where To Download SNES ROMs

Multifunctional Video Conversion Tools – Wondershare Video Converter

Multifunctional Video Conversion Tools – Wondershare Video Converter

  • Popular
  • Latest
  • Today Week Month All
  • Access to the resource [servershare] has been disallowed Access to the resource [servershare] has been disallowed
  • Read the Event Logs on Windows Server Core Read the Event Logs on Windows Server Core
  • Increase IIS Private Memory Limit to improve WSUS availability Increase IIS Private Memory Limit to improve WSUS availability
  • How to ‘Unblock’ multiple files at a time with PowerShell How to 'Unblock' multiple files at a time with PowerShell
  • Setup your DFS namespace with DNS for compatibility in a mixed environment Setup your DFS namespace with DNS for compatibility in a mixed environment
  • How Virtual Reality Supports Mental Health Therapy How Virtual Reality Supports Mental Health Therapy
  • Key Strategies of Successful Coin Listing on Exchange Key Strategies of Successful Coin Listing on Exchange
  • Keeping Your Mac Healthy: A Comprehensive Guide to Maintenance and Troubleshooting Keeping Your Mac Healthy: A Comprehensive Guide to Maintenance and Troubleshooting
  • Making Distributed Software Development Work: Strategies and Best Practices for Managing Remote Teams Making Distributed Software Development Work: Strategies and Best Practices for Managing Remote Teams
  • customer contactless payment for drink with mobile phon at cafe counter bar,seller coffee shop accept payment by mobile.new normal lifestyle concept The Latest Innovations In Payment Technology
Ajax spinner

Elevator Pitch

404 Tech Support documents solutions to IT problems, shares worthwhile software and websites, and reviews hardware, consumer electronics, and technology-related books.

Subscribe to 404TS articles by email.

Recent Posts

  • How Virtual Reality Supports Mental Health Therapy
  • Key Strategies of Successful Coin Listing on Exchange
  • Keeping Your Mac Healthy: A Comprehensive Guide to Maintenance and Troubleshooting

Search

FTC Disclaimer

404TechSupport is an Amazon.com affiliate; when you click on an Amazon link from 404TS, the site gets a cut of the proceeds from whatever you buy. This site also uses Skimlinks for smart monetization of other affiliate links.
Use of this site requires displaying and viewing ads as they are presented.

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in