You can have Swif fix devices as soon as they fall out of compliance. Create a Smart Device Group of devices that fail a compliance control, then give the group a policy or command that fixes the problem. When a device fails the control, it joins the group, and gets the fix.
For example: when a Mac falls behind on macOS updates, it joins a group that installs the update.
How it works
A compliance control checks your devices, such as whether they're on the latest OS.
A Smart Device Group selects the devices that fail it, with the condition Status: Non Compliant.
The group has a policy or command that fixes the problem.
When a device fails the control, it joins the group, and gets the group's policy, or command.
When it's compliant again, it leaves the group.
Membership updates on its own, as each device's compliance status changes.
Step 1: Choose a compliance control
Find the control for the problem you want to fix, in the Compliance Center. For example:
Problem | Control |
The OS is out of date | A system control, such as AA-04 Outdated OS Version |
A major OS upgrade is waiting, such as a new macOS version | A custom control, with the Latest major OS option. Available for Mac and Windows. |
You can use Swif's system controls, or your own custom controls.
Step 2: Create a Smart Device Group of failing devices
Go to Device Management > Device Groups, and create a Smart Group.
Add the conditions:
Compliance Control: the control from Step 1, such as AA-04 Outdated OS Version
Status: Non Compliant
Under Additional Settings, leave Auto-Remove Group Policies off. See Avoid a fix loop below.
Save the group.
The group lists every device that fails the control now. You can also filter, and export, devices by compliance control and status, to check the list.
Step 3: Give the group a fix
Assign a policy, a command, or both, to the group.
Option A: A policy
Use a policy when the fix is a setting Swif can keep in place, such as installing updates, turning on encryption, or turning on the firewall.
Go to Device Management > Policies, and open, or create, the policy.
Assign it to the Smart Device Group from Step 2.
Every device that joins the group gets the policy.
Option B: A command
Use a command when the fix is a script, such as running a software update, or reinstalling an app.
Go to Device Management > Commands, and create the command.
Under Run Schedule, choose Run as Scheduled, for example once a day.
Assign it to the Smart Device Group from Step 2.
Devices in the group run the command at each scheduled time. Devices that join later run it at the next scheduled time. See Running a Scheduled Command Script.
Avoid a fix loop
With Auto-Remove Group Policies on, a fix can undo itself:
A device fails the control, joins the group, and gets the fix policy.
The policy fixes it, so it's compliant, and leaves the group.
Auto-Remove removes the policy, so the device can fall out of compliance again.
It rejoins the group, and the cycle repeats.
For groups like this, keep Auto-Remove Group Policies off. The fix stays on the device after it becomes compliant.
Examples
Goal | Compliance control | Fix for the group |
Keep Macs up to date | AA-04 Outdated OS Version, Non Compliant | A software update policy, or a scheduled command that installs updates |
Upgrade to the latest macOS or Windows version | A custom control with Latest major OS, Non Compliant | A software update policy, or a scheduled upgrade command |
Things to know
Membership changes as compliance changes. There's no fixed delay, but compliance needs to be checked first, so a device joins a group once Swif sees it's non-compliant.
Scheduled commands keep running for every device in the group, at each scheduled time. Use commands that are safe to run more than once.
Commands set to Run Manually only run when you click Run. Devices that join later don't run them on their own.
Test with a few devices first, before using a fix group across your fleet.
Troubleshooting
A non-compliant device isn't in the group
Check that the device's compliance status for the control is Non Compliant, in the Compliance Center.
Check the group's conditions: the control, and Status: Non Compliant.
Check that the device isn't in the group's Excluded Devices.
A device keeps joining and leaving the group
Auto-Remove Group Policies is on, so the fix is removed once the device is compliant. Turn it off for the group. See Avoid a fix loop.
A device in the group didn't run the command
Check that the command is set to Run as Scheduled, and that Command Status is on. Devices in the group run it at the next scheduled time.
Related resources