---
id: "faebc30c-87f4-4eab-8185-834947f221e6"
name: windows-wifi-onboarding-script-generator-5825d6bb721f
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


---
Source attribution: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: ECNU-ICALK
Original project: https://github.com/ECNU-ICALK/AutoSkill
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Development & Engineering
Roles: DevOps / SRE
Specialties: Backend
Tools: Windows
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 501abd5c2ec10a519eb65dd3c31632f1dbeda2af1fa2c16eb9eb5420f1ef3911
