One PowerShell script replaces the morning routine: SSH, VMware, and Chrome launch automatically

One PowerShell script replaces the morning routine: SSH, VMware, and Chrome launch automatically

A journalist who uses a Windows laptop for both work and personal tasks grew tired of manually launching the same apps and services every morning. To eliminate repetitive actions, he wrote a custom PowerShell script that prepares the working environment automatically upon login.

The issue wasn't just about opening a browser with the right tabs. In addition to Chrome with work profiles, he needed to connect via SSH to a home server, start a VMware virtual machine running Windows 11 Insider, and monitor several dashboards for self-hosted services. Standard Windows startup tools couldn't handle all these tasks with the required fine-tuning, so a script became necessary.

The script consists of three main blocks. The first block automatically establishes an SSH session with the server, supplying the username. The second block launches a VMware virtual machine with an experimental Windows 11 Insider build. The third block opens Chrome with a dedicated profile that preloads tabs for Asana, Slack, Google Docs, and other work-related web services.

Additionally, the script opens web portals for managing home infrastructure: Portainer, Dockhand, Beszel, and Glance. These dashboards are used to monitor servers running containers and other self-hosted applications. The author notes he could have simply added Chrome to startup with predefined URLs, but that approach wouldn't cover the other tasks requiring precise configuration.

As a result, automation reduced preparation time to a minimum. The author admits he wasn't previously a fan of scripts, considering them an overly complex solution for simple tasks. However, the only script he used before—for backing up files to an external drive via Robocopy—showed that automation is useful. Now, booting the system takes seconds, and the desktop is ready for work immediately after logging into Windows.

Slate (Sl8) — the new social network. Post, grow your audience and earn — plus staking rewards that actually pay.
Invite codehXA6hX
Join Slate