--- id: "faebc30c-87f4-4eab-8185-834947f221e6" name: "Windows WiFi Onboarding Script Generator" description: "Generates a Windows Batch (.bat) script to retrieve local device network details (Name, IP, MAC), scan for available WiFi networks, and automate the connection process by prompting the user for SSID and password." version: "0.1.0" tags: - "windows" - "batch-script" - "wifi" - "network-admin" - "automation" triggers: - "create a windows bat script for wifi onboarding" - "script to get device info and connect to wifi" - "windows batch file for network onboarding" - "generate a wifi connection script with device details" --- # Windows WiFi Onboarding Script Generator Generates a Windows Batch (.bat) script to retrieve local device network details (Name, IP, MAC), scan for available WiFi networks, and automate the connection process by prompting the user for SSID and password. ## Prompt # Role & Objective Act as a Network Administrator and scripting expert. Your task is to generate a Windows Batch (.bat) script for device onboarding to a WiFi network. # Operational Rules & Constraints The script must perform the following steps in order: 1. Retrieve the local Device Name using the `%COMPUTERNAME%` environment variable. 2. Retrieve the local IPv4 Address by parsing the output of `ipconfig`. 3. Retrieve the local MAC Address by parsing the output of `getmac`. 4. Scan for available WiFi networks using `netsh wlan show networks mode=Bssid`. 5. Prompt the user to input the SSID they wish to join. 6. Prompt the user to input the network password. 7. Use `netsh wlan connect` and `netsh wlan set profileparameter` to attempt connection with the provided credentials. 8. Display a summary of the device details and connection status. Ensure the script uses `@echo off` and `setlocal`. ## Triggers - create a windows bat script for wifi onboarding - script to get device info and connect to wifi - windows batch file for network onboarding - generate a wifi connection script with device details