Keep Microsoft Teams Active
A one-line terminal command that genuinely prevents Teams from showing you as Away. No install, no browser gimmicks.
A note on this tool: This is for professionals who are working, just not at their desk. It's not a replacement for actual availability — it's a fix for Teams' blunt 5-minute idle logic that can't tell the difference between "away" and "thinking."
Enhanced Options (for better detection avoidance)
How to use — 3 steps
Open PowerShell
Press Win + X → click "Terminal" or "PowerShell"
Paste the command & press Enter
Click "Generate Enhanced Teams Script" above, then copy it
You're done — Teams stays green
A dot . prints each cycle so you know it's working. Press Ctrl + C to stop anytime.
Why Enhanced Options Help
- • Input Shuffling: Alternates between mouse movement, keyboard input, and scrolling to avoid predictable patterns
- • Timing Jitter: Adds random variation to intervals (±3 seconds) to make activity less regular
- • Window-specific detection: Only activates when the target app window is detected
- • Randomized movement: Mouse movement is randomized in direction and distance rather than fixed patterns
Nothing leaves your browser. The script is generated client-side. No data is sent to our servers. The command runs entirely on your machine and stops the moment you press Ctrl+C.
Out of the office but still in your head? Record your thoughts as a voice memo and let FifthDraft turn them into structured notes or a project brief when you're back.
Try FifthDraft FreeWhy Does Teams Mark You as Away?
Microsoft Teams uses OS-level input detection to determine your activity status. After approximately 5 minutes of no detected mouse movement or keyboard input anywhere on your system, Teams automatically changes your status from "Available" (green) to "Away" (yellow). This uses the Windows GetLastInputInfo() API, which tracks the timestamp of the last real hardware input event system-wide.
The problem is that this logic can't distinguish between "I stepped away from my computer" and "I'm reading a long document, thinking through a problem, or on a phone call." Professionals who work thoughtfully — reading, reviewing, or on calls — get flagged as Away constantly.
How These Scripts Actually Work
Unlike browser-based tools that fire sandboxed DOM events, these terminal commands operate at the OS level:
- Windows (PowerShell): Uses .NET P/Invoke to call the Win32
SendInput()API directly. This injects a real mouse movement event (1 pixel right, then 1 pixel left) into the OS input queue.SendInputresetsGetLastInputInfo()— which is exactly what Teams reads to determine your idle state. The movement is invisible (1 pixel) but the OS registers it as genuine hardware input. - macOS: Uses
caffeinate -u, a built-in macOS utility that asserts "user is active" to the IOKit power management system. This resets the system idle timer that Teams (and Slack) read via Electron'spowerMonitor.getSystemIdleTime(). No additional installs needed —caffeinateships with every Mac. - Linux: Uses
xdotoolto generate X11 input events that move the mouse 1 pixel right, then 1 pixel back. These are real X server events that reset the X idle timer. Install withsudo apt install xdotoolif not already present.
Why Browser-Based Tools Don't Work
Many websites offer "keep active" tools that run in your browser tab using JavaScript. These tools typically dispatch synthetic mouse and keyboard events, draw pixels on hidden canvases, and use the Screen Wake Lock API. While they show convincing dashboards with signal counts and timers, none of these techniques reset the OS idle timer.
JavaScript runs inside a browser security sandbox. When a script fires new MouseEvent('mousemove'), that event exists only within the browser's DOM — it never reaches the Windows input subsystem or updates GetLastInputInfo(). The Wake Lock API prevents your screen from dimming, but doesn't generate any input events. Teams desktop doesn't monitor your browser tabs — it reads the OS idle timer directly.
How to Use (30 Seconds)
- 1. Open your terminal (PowerShell on Windows, Terminal on Mac/Linux)
- 2. Copy the command from the generator above
- 3. Paste it and press Enter
- 4. You'll see a dot printed each cycle — confirming it's running
- 5. Press Ctrl+C when you're done to stop it
That's it. No installs, no admin rights, no background services. The command runs in your terminal and stops the instant you close it or press Ctrl+C.
Frequently Asked Questions
Can my employer detect this?
The script generates real mouse movements identical to you nudging your mouse. Standard monitoring tools cannot distinguish it from normal activity. Unlike installed software, a PowerShell one-liner doesn't appear in software inventories. That said, always use your best judgment based on your organization's policies.
Does this work for Slack too?
Yes — Slack desktop also reads the OS idle timer (via Electron's powerMonitor.getSystemIdleTime()). The same scripts work. We also have a dedicated Keep Slack Active page.
Is this better than a USB mouse jiggler?
A hardware mouse jiggler also works (it generates real HID input events). The advantage of this script is that it's free, requires no hardware, and you can stop it instantly. The advantage of hardware is that it works even if your company restricts PowerShell execution.
Does the PowerShell script need admin rights?
No. SendInput works from a regular user PowerShell session. No elevated privileges required.
Will I see my mouse moving?
The script moves the cursor 1 pixel right, then 1 pixel left — a net movement of zero. You won't notice it visually, but the OS registers it as real input activity.
Does FifthDraft collect any data?
No. The script is generated in your browser. Nothing is sent to our servers. The command runs entirely on your machine.