Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
Redmond desk4 min

How I Built a Windows Security Monitor That Records Intruders Automatically Using PowerShell

Toluwanimi Alfred’s PowerShell monitor watches for three failed logons in 30 seconds, then attempts email alerts and webcam recording. Here’s how it works and what it cannot guarantee.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Toluwanimi Alfred’s PowerShell project watches Windows Security events for three failed logon attempts within a rolling 30-second window, then sends email alerts and attempts to start webcam recording with FFmpeg. That is the behavior Alfred describes—not a guarantee that Windows will identify or record every intruder. The script reacts to logged failed logons; it does not prevent access, and Alfred says recording in his setup could not begin until a user had logged in.

What the monitor does

Alfred built the monitor for a PC that could not be stolen but might be accessed without permission. Its trigger is Windows Security Event ID 4625, which represents a failed logon. The script polls a rolling 30-second period and, when it counts three failures, sends notifications to two configured email addresses and launches a webcam-recording process using FFmpeg. The example uses Gmail SMTP and an integrated webcam. These are choices in Alfred’s project, not required Windows components. Alfred’s project walkthrough reports that the setup recorded footage, but that result has not been independently verified.

As an Amazon Associate I earn from qualifying purchases.

How to interpret the trigger

The threshold and time window are implementation settings, not a Windows security standard or evidence of a confirmed intrusion. A failed logon can have benign causes, such as a mistyped password. Conversely, a person who already has valid credentials may not generate failed-logon events at all. The monitor’s signal is therefore narrow: it responds to a particular pattern of failed attempts that Windows has logged.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows administrators can configure native auditing for logon attempts. Microsoft’s Audit Logon guidance describes auditing logon attempts and related logon-session events on the computer being accessed. A script that depends on event records can only act on the events that the system actually audits and makes available to it.

#1 Best Overall
Tapo 1080P Indoor Security Camera, Baby Monitor, Dog Camera, Wired, C100 | Motion Detection, 2-Way Audio, Siren, Night Vision, Cloud & SD Card Storage, Works w/Alexa & Google Home
  • ENDLESS POWER FROM SOLAR ENERGY: Just 45 minutes of direct sunlight powers the camera for a full day of use, while the built-in battery lasts up to 180 days on a single charge during cloudy days. Solar charging requires temperatures above 32°F.△
  • EASY WIRE-FREE INSTALLATION: Place the Tapo SolarCam C402 KIT where you need it without relying on nearby outlets. Install the camera and solar panel together or separately using the included 13 ft cable for flexible placement.
  • PRIORITIZE WHAT MATTERS: Set activity zones to monitor specific areas for motion or people. Free person and motion detection helps reduce unwanted alerts and notifies you when activity is detected.
  • VERSATILE VIDEO STORAGE: Store footage locally via a microSD card (up to 512GB)* or via cloud with a Tapo Care cloud subscription. Tailor your security to suit your needs, whether indoor or outdoor, you have the storage option you need.
  • FULL-COLOR 1080P, DAY AND NIGHT: See clearly in low light with a large-aperture lens and built-in spotlights. Capture full-color night vision up to 30 ft away to monitor for possible intruders or motion.

What the project does not establish

  • It is not a prevention mechanism. An alert or recording action after failed attempts does not block an account compromise or stop someone who successfully logs in.
  • Recording is conditional. Alfred says his setup could not start recording before a user logged in. Camera availability, permissions, process launch behavior, and Windows configuration can affect whether recording begins.
  • It is not tamper-resistant. A monitor running on the same PC may be disabled or its records altered by someone who gains sufficient access to that machine.
  • The notification setup needs secure credential handling. Alfred describes Gmail SMTP, but the walkthrough does not establish a secure credential-storage design. Do not place an account password or app password directly in a script.

Where Sysmon fits—and where it does not

Microsoft Sysmon is a separate Windows telemetry option, not a replacement that automatically sends email or turns on a camera. Microsoft describes Sysmon as recording selected system activity to the Windows Event Log; it does not analyze those events or block activity. Its records can be forwarded to a collection system or SIEM for analysis. Microsoft’s Sysmon page lists version 15.22 and was published September 10, 2026.

Sysmon’s configurable coverage can include activity beyond failed logons, such as process and network events, but what it records depends on configuration. Microsoft recommends selecting a configuration that matches the telemetry needed and managing event volume. See Microsoft’s guide to enabling and configuring Sysmon.

Rank #2
Blink Outdoor 4 – Wireless smart security camera, two-year battery life, 1080p HD day and infrared night live view, two-way talk. Sync Module Core included – 3 camera system
  • Outdoor 4 is our most affordable wireless smart security camera yet, offering up to two-year battery life for around-the-clock peace of mind. Local storage not included with Sync Module Core.
  • See and speak from the Blink app — Experience 1080p HD live view, infrared night vision, and crisp two-way audio.
  • Two-year battery life — Set up in minutes and get up to two years of power with the included AA Energizer lithium batteries and a Blink Sync Module Core.
  • Enhanced motion detection — Be alerted to motion faster from your smartphone with dual-zone, enhanced motion detection.
  • Person detection — Get alerts when a person is detected with embedded computer vision (CV) as part of an optional Blink Subscription Plan (sold separately).
Approach Coverage Response Key operational consideration
Alfred’s custom PowerShell monitor Failed logons matching the script’s Event ID 4625 count and time window Email notification and an attempted FFmpeg webcam recording Depends on audit events, script execution, mail configuration, camera availability, and access to the same PC
Windows logon auditing Configured logon attempts and related logon-session events, as described by Microsoft Creates audit events; response requires additional tooling or operator action Audit policy determines which events are captured
Sysmon Selected system activity according to its configuration Telemetry only; Sysmon itself does not analyze or block events Configuration and event volume need management; forwarding enables central analysis

PowerShell logging answers a different question

Windows PowerShell Script Block Logging can provide information about PowerShell script activity; Protected Event Logging is intended to help protect sensitive log data, including by encrypting it for later handling at a more secure central collector. These capabilities can help investigators understand what PowerShell did, but they do not confirm an intrusion or cause a camera to start. Microsoft explains these mechanisms in its overview of scripting security and protection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Another distinct option is process command-line auditing. Microsoft’s advisory says that, after the relevant policy is enabled and configured, process-creation event 4688 can include command-line information in plain text. Command lines may contain sensitive data, so access, retention, and forwarding should be planned accordingly. See Microsoft’s command-line auditing advisory.

Rank #3
Sale
Tapo 2K Pan Tilt Security Camera for Baby Monitor, Dog Camera, C210P2
  • 【2K High Definition】Capture every detail inside your home with crystal-clear 2K high definition video with this indoor security camera. Easily see what your baby is holding or what your pet is playing with.Controller Type:Amazon Alexa;Android;Google Assistant.Connectivity protocol:Wi-Fi.Power source type:Corded Electric, Power Adapter: 100–240 V. Connects via 2.4GHz Wi-Fi Band
  • 【Up, Down, All Around】This Pan/Tilt camera see everything across an entire room or walkway with the 360° horizontal and 114° vertical range pan/tilt field of view.
  • 【Detection & Instant Notification】Get instant push notifications when motion, person or baby crying is detected, there is no additional fee to use it as a baby camera monitor. Discern from notifications that matter, so you'll know if its your pet playing around or if someone is actually there.
  • 【Works w/ Alexa & Google Assistant】Fully compatible with Amazon Alexa and Google Assistant, use your simple voice command to view Tapo indoor security camera live stream on Echo Show or Google Chrome Cast with a screen. Streaming via Google limited to display on Chromecast & Nest devices only.
  • 【2-Way Audio w/ Built In Siren】Never truly leave home with the built-in 2-way audio. Use as a pet camera with phone app to comfort your pet from anywhere in the world. Keep your family safe with cameras for home security indoor by warding off intruders.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Operational issues Alfred reports

Alfred describes troubleshooting inaccurate event counts, launching FFmpeg with DirectShow, preventing concurrent script instances, and correcting typographic characters introduced when copying code. These are useful reminders that a monitoring script has multiple failure points: event selection, timing and counting, process startup, and the script text itself. The walkthrough is a project account rather than an independently tested, production-ready deployment guide. For broader Windows auditing context, Microsoft’s Windows 10 and Windows Server 2016 security auditing and monitoring reference was published July 15, 2024.

Rank #4
AOQEE 2K Cameras for Home Security, Indoor/Outdoor, Full Color, C1 2Pack
  • 【2K Resolution & Color Night Vision】This 2K Ultra HD security camera is designed for indoors and outdoors. You can choose to install indoor and outdoor cameras for home security in the kitchen, living room, bedroom, baby room, yard, garage, etc. You can not only capture high-definition surveillance footage through the security camera outdoor during the day, but also see colorful images at night. The outdoor camera provides comprehensive and multi period services for your home security.
  • 【Two-way Talk & Motion Detection】The outdoor security camera is equipped with a noise-canceling microphone and speaker. You can have a remote talk with family, pet or unexpected visitor on the wifi camera side through the phone app. The house cameras with audio and video will bring you an unexpected user experience. Once the motion is detected, the indoor camera will send you a notification via the phone app. If strangers break into home, the built-in siren will help you deter the intruders.
  • 【IP65 Waterproof & Easy to install】The outdoor cameras for home security, which have an IP65 waterproof design, so in any weather, there is no need to worry about the outdoor cameras being damaged. The security camera outdoor with dust and water resistance that can be easily installed on walls, shelves, trees, roofs, and other places you want, helping you to keep an eye on your home security anytime and anywhere.
  • 【24/7 SD Card Storage & Optional Cloud】 The wifi outdoor camera features in-app 10s alert video clips or pictures. It also supports TF card (up to 128GB, not included) or cloud storage (with a 30-day trial). Both storage ways allow for 24/7 continuous recording, ensuring that you can play back your videos whenever you want. This indoor camera also has advanced encryption technology to protect your privacy, so even if the home security cameras are stolen, no one can access your recorded videos.
  • 【Work with Alexa Assistance】The cameras for home security, which can also work with Alexa assistant. If you have third parties at home, you can connect the wifi camera with them, use your simple voice command to view the indoor security camera live stream on Echo Show or other Alexa devices with a screen. Easily get your home security footage up on a larger TV display.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.