Have a PXE Server that randomly gets disconnected? Or an unstable PXE Server? Constantly have to remotely connect to and restart the PXE Server? Here's a script to help keep your PXE Servers alive and connected to the PXE Manager.
This is to be executed on the PXE Manager (Deployment Server), not on each PXE Server. Create a Windows Schedule to run the script as often as you'd like to check remote PXE Servers for a connection. I'd recommend getting all PXE Servers connected and manually running the script first to get the list populated before creating the schedule.
The concept is simple; run the script and the following happens:
- The script checks a file with a list of PXE Servers (creates one if it doesn't exist).
- It then checks all active connections, and parses through them to check for remote PXE Servers (a local PXE Server will show up as well).
- It compares the list of previous PXE Servers (from the list) with current PXE Servers and marks any missing PXE Servers and any new PXE Servers.
- It then makes an RPC call to restart the PXE Config Helper service on the remote PXE Servers who are not connected to the PXE Manager.
- It appends all new PXE Servers to the file.