This PowerShell script automates opening Microsoft Edge with multiple profiles, performing Bing searches, and closing the browser after a set time. It is useful for automating browsing tasks, testing, or research purposes.
- ✅ Opens Microsoft Edge with specific profiles.
- ✅ Performs randomized Bing searches.
- ✅ Waits for a set duration before closing Edge.
- ✅ Closes only the Edge instances launched by the script.
- ✅ Uses an external search terms file for better randomness.
- Windows OS with PowerShell 5.1+.
- Microsoft Edge installed at the default location (
C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe). - Ensure Edge Profiles Exist: Check
C:\Users\YourUserName\AppData\Local\Microsoft\Edge\User Datafor profile names. - Create a
search_terms.txtfile containing a list of words (one per line) for Bing searches.
git clone https://github.com/letsconfuse/edge-automation.git
cd edge-automation- Modify the Edge path if it differs from the default location.
- Update the profile names to match your Edge profile directories.
powershell -ExecutionPolicy Bypass -File edge_automation.ps1The script contains a list of profiles and sleep durations:
$profiles = @(
@{ ProfileName = "Profile 10"; SleepDuration = 600 },
@{ ProfileName = "Profile 11"; SleepDuration = 600 }
)- ProfileName: The name of the Edge profile to use.
- SleepDuration: How long the browser stays open before closing (in seconds).
- Opens Edge with a given profile.
- Performs a Bing search with a random word from
search_terms.txt. - Keeps the session open for the defined time.
- Closes only the Edge windows related to the session.
- Repeats for the next profile in the list.
✅ Ensure the profile name is correct (Check C:\Users\YourUserName\AppData\Local\Microsoft\Edge\User Data).
✅ Modify the Stop-Process command to only close relevant instances.
✅ Run:
Set-ExecutionPolicy Bypass -Scope Process -ForceThis project is licensed under the MIT License.
Feel free to submit issues or pull requests to improve this script.