My Mobile phone Bluetooth is paired with my Laptop. I am trying to write a power shell script which can catch an event if I move out of Bluetooth range. Any leads on this idea?
You are talking using a WMI event to monitor event logs for event ID's
So, you are going to have to research to find out what the event ID is and the log where it will show up and have your WMI log watcher fire off some alert.
Just curious. Why is this a thing for you?
I mean, you'll know when you are out of range with the connection drops / stops working. Why go the extra step of have PoSH send you a notification about something you'll already know has happened.
WMI Event Watcher Task'docs.microsoft.com/en-us/sql/integration-services/control-flow/wmi-event-watcher-task'
Attaching scripts or tasks to Windows event log entries using PowerShell and WMI'ravichaganti.com/blog/attaching-scripts-or-tasks-to-windows-event-log-entries-using-powershell-and-wmi'
PowerShell EventLogWatcher Module'archive.codeplex.com/?p=pseventlogwatcher'