IT_Man_Dan Posted April 9, 2019 Posted April 9, 2019 (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 April 9, 2019 by IT_Man_Dan
HPlum78 Posted April 9, 2019 Posted April 9, 2019 (edited) 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 Edited April 9, 2019 by HPlum78
ThomL Posted April 9, 2019 Posted April 9, 2019 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..
free780 Posted April 9, 2019 Posted April 9, 2019 If you can you could grab the mac and IP from DHCP. It depends on how your PCs are named. You may be able to wildcard it.
ThomL Posted April 9, 2019 Posted April 9, 2019 (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 April 9, 2019 by ThomL 1
HPlum78 Posted April 9, 2019 Posted April 9, 2019 Nice one @ThomL good to see. And agree loads of options for more automation as you have suggested.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now