Jump to content

Recommended Posts

Posted (edited)

Afternoon all,

 

Where I currently am working they are using a powershell script to startup computers using a txt file with all the mac addresses in using wolcmd.exe.

Am I right in thinking I could change this to work with the computername (eg E1-01) rather than the mac address?

 

The reason I ask is it seems quite fiddly to find out all of the relevent mac addresses rather than just list the computer names you want it to apply to?

 

If not does anyone know how best to select a group of computers in DHCP and copy just their mac addresses?

It's an RM CC4 network here and the remote startup/shutdown scheduled tasks in the management console aren't reliable enough (if they work at all).

 

Thanks

Edited by IT_Man_Dan
Posted
Magic packets need the mac/ ip to work, if I remember rightly.

 

https://gallery.technet.microsoft.com/scriptcenter/Wake-on-LAN-via-Host-Name-a2d00b67

 

A quick look at this script - you could tweak it a little so you could load hostname from csv and then loop through them rather than it prompting for hostname as it does at the moment which would make it much better, or even tweak it further to point to straight to the csv file and have the script do all the lifting..

Posted (edited)

This uses the script linked to by HPlum78 but also accepts the param -CSV to supply the path to a .csv filled with host names. From my testing it works, but results may differ: WoL-HostName-CSV.ps1

 

Taking this further next I'd make it lookup an AD group for the Computer objects rather than using a CSV and then just make the computers i want to wake each day a member of that group bit of scheduling to make the script launch each day and you're done totally hands off after adding computers to the needed group

Edited by ThomL
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...