Office check-in script not working
Last updated
Who this is for: IT admins who have rolled out our example check-in script for Windows computers. The script is an unsupported example: we support the check-in API it uses, not the script itself. These checks cover the usual reasons it stops sending check-ins.
Find out why a computer isn't sending office check-ins to Team Today.
Check Team Today first
- Automatic check-in is switched on for your account. If you're not sure, email support@team-today.com and we will check.
- Your office internet address is approved. Go to Settings > Offices and meeting rooms, choose the office and choose Automatic Check-in. Check-ins from an address that still shows Pending approval are ignored.
- Look at the Check-in log and Ignored check-ins for the day. See Check it is working. Ignored check-ins tells you why a check-in from an approved address could not be recorded.
Team Today answers every check-in with HTTP 204, whether or not it was recorded, so a 204 in the script's log only means the check-in reached us.
Why Task Scheduler and Event Viewer look empty
- Task Scheduler: the task runs under the SYSTEM account. If you open Task Scheduler without administrator rights, the Team Today folder can look empty. Open Task Scheduler with Run as administrator to see the Office check-in task.
- Event Viewer: Windows switches off the Task Scheduler log by default, so it shows as Disabled with no events. The script doesn't write to Event Viewer. It keeps its own log at
C:\ProgramData\TeamToday\OfficeCheckIn\checkin.log, which only administrators can open.
Checks to run on the computer
Open PowerShell with Run as administrator on the computer that isn't checking in, ideally while the person is in the office. Run each command, then find what you see in the table.
| Command | What to look for | What it means |
|---|---|---|
Get-ScheduledTask -TaskPath '\Team Today\' | Error: "No MSFT_ScheduledTask objects found" | The task isn't installed, or the uninstall script removed it. Run the install script again, and check the computer isn't also assigned the uninstall script. |
State Ready | Installed and switched on. Go on to the next check. | |
State Disabled | Something has switched it off. Enable it in Task Scheduler. | |
State Running for more than a few minutes | A run is stuck. New triggers are skipped until Windows stops it after 5 minutes. | |
(Get-ScheduledTask -TaskPath '\Team Today\').Triggers | Three triggers: a logon trigger, a session state change trigger and an event trigger | As installed: it starts after someone signs in, unlocks the computer or it joins a network. |
| Fewer, or none | The task has been changed. Run the install script again. | |
Get-ScheduledTaskInfo -TaskPath '\Team Today\' -TaskName 'Office check-in' | LastRunTime after the person last signed in or unlocked the computer | The task is starting. The log in the next check says what it did. |
LastRunTime older than that | Windows isn't starting the task. Check the triggers above, and see If the task never starts. | |
LastTaskResult 0 | The script finished normally. The log says what it decided. | |
LastTaskResult 1, with a "Check-in failed" line in the log at that time | The script hit an error. The log line says which. | |
LastTaskResult 1, with no log line at that time | Windows stopped the script before it started, usually because of an execution policy. See Get-ExecutionPolicy below. | |
LastTaskResult 267011 | The task has never run. | |
LastTaskResult 267014 | Windows stopped it after 5 minutes because something hung. | |
LastTaskResult -196608 | PowerShell couldn't find the script file. Security software may have removed it. See the last check. | |
Get-Content 'C:\ProgramData\TeamToday\OfficeCheckIn\checkin.log' -Tail 30 | "Sent check-in for ... (HTTP 204)" | It sent. If the check-in isn't in the Check-in log, see Check Team Today first. |
| "Team Today returned HTTP ..." | Something answered with an error, often a proxy server. It tries again the next time the task runs. | |
| "Network '...' is not one of the office networks in config.json" | The office network filter stopped it. Compare the name with the dry run below and add it to $OfficeNetworks. | |
| "Network '' is not one of the office networks" | Windows didn't report a network name. On Windows 11 24H2 and later, Wi-Fi names are only available when location services are on. | |
| "The computer is locked" on every run, even while someone was using it | The lock check is wrong on this computer. Let us know at support@team-today.com. | |
| "Nobody is signed in at the computer itself" | Normal when the computer joins a network before anyone signs in. If it appears on every run, the person is probably using remote desktop, which never checks in. | |
| "Already checked in today" | Normal. It sends once per person, network and day. | |
| "Could not find the sign-in name" | The person isn't signed in with an Entra ID or Active Directory work account, so the script can't tell who they are. | |
| "Check-in failed: ..." | The rest of the line says why. Usually there was no internet connection, or the computer needs a proxy server set in $ProxyUrl. | |
| Error: "Cannot find path" | The script has never finished a run on this computer. | |
Get-Content 'C:\Program Files\Team Today\Office Check-in\config.json' | OfficeNetworks lists names | It only sends on those networks, and the names must match what Windows reports exactly. |
OfficeNetworks is empty | It sends from every network. If the log has nothing recent either, the task isn't running. | |
Endpoint isn't https://scim.team-today.com/ocip/v1 | It's sending to the wrong address. | |
ProxyUrl is set | Check that the proxy server address is right. | |
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Team Today\Office Check-in\Send-OfficeCheckIn.ps1" -DryRun | "Would send to ..." followed by the details | It would send now. Check that the email address is the one the person uses in Team Today. |
| "Network 'X' is not one of the office networks" | X is the name Windows reports. Add it to $OfficeNetworks and deploy the install script again. | |
| "The computer is locked" while someone is using it | The lock check is wrong on this computer. Let us know at support@team-today.com. | |
| "is not digitally signed" or "running scripts is disabled" | An execution policy set by Group Policy or Intune is blocking the script. See the next check. | |
Get-ExecutionPolicy -List | MachinePolicy or UserPolicy set to AllSigned or Restricted | The policy overrides the task's Bypass, so the unsigned script can't run. Sign the script with your own certificate, or change the policy. |
Undefined, RemoteSigned, Unrestricted or Bypass | Not the problem. | |
Get-ChildItem 'C:\Program Files\Team Today\Office Check-in' | Both Send-OfficeCheckIn.ps1 and config.json are there | Installed correctly. |
Send-OfficeCheckIn.ps1 is missing | Something removed it, usually security software. Check its quarantine, allow the file, then run the install script again. |
If the task never starts
The task starts a minute or two after someone signs in, unlocks the computer or it joins a network. A laptop that doesn't ask for a sign-in when it wakes, and stays on Wi-Fi while it sleeps, can go days without any of these. Setting computers to require a sign-in on wake fixes this.
Still stuck?
Email support@team-today.com with the output of these checks, the person's email address and when they were in the office. We can see whether their check-ins reached us and why any were ignored.