Code Monkey home page Code Monkey logo

pwsh_send-magicpacket's Introduction

PWSH_Send-MagicPacket

Sends WOL packet to a specified MAC address.

Installation instructions

  1. Download the script (Send-MagicPacket.ps1) and the JSON (targetsList.json) file.

  2. Put the script in a directory of your choice

  3. Move the JSON file in the ~\.config\WakeOnLan\ folder. To do this you can run these commands in PowerShell (assuming the JSON file is in the Downloads folder):

    New-Item -ItemType Directory -Path $env:HOMEPATH -Name .config -ErrorAction SilentlyContinue
    New-Item -ItemType Directory -Path $env:HOMEPATH\.config -Name WakeOnLan -ErrorAction SilentlyContinue
    Move-Item -Path $env:HOMEPATH\Downloads\targetsList.json -Destination $env:HOMEPATH\.config\WakeOnLan\
  4. Edit the JSON file to match your configuration

Usage

To run the script, open PowerShell in any terminal and type:

.\path\to\script\Send-MagicPacket.ps1

The script will then prompt the user to choose the MAC address of the target machine:

List of known hosts:

[0]> AB-C1-D2-E3-EF-F9   Friendly Name:  Example PC #1
[1]> BC-D9-E8-F7-EF-A1   Friendly Name:  Example PC #2
[2]> User-defined

Choose target of Magic Packet:

By pressing 0 (or 1) and then the Enter key, a WOL packet will be sent to the Example PC #1 (or #2). If the input is 2, the script will prompt the user to insert a MAC address of their choosing. The address' bytes may be separated using - or :.

pwsh_send-magicpacket's People

Contributors

sykde avatar

Stargazers

Boyd Fields avatar

Watchers

Boyd Fields avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.