Hi, I wanted to know how to achieve this as I could not it find any where, and unsure if this is possible. I have a DC server with DNS, DHCP configured. What I want to do is once a client receives an IP from the DHCP server (IP address is issued only for MAC address reserved against it), then a script should run on the client (bear in mind the client has not joined AD domain, it just received an IP). Thank You
If you know the administrator account of the non domain-joined and the administritive share is enabled beforehand, you could be pinging the desired IP and psexec the computer when it start replying. What exactly are you trying to accomplish? I think pxe boot could be an option for some tasks.
Hi, Sorry for the latd reply. I'm trying to automate server deployments in a homelab. In my case I have a Primary DC with scripts to configure Secondary DC and some other servers. The idea is as follows. The primary DC is configured with DHCP Mac address IP reservation, soon as Secondary DC receives the IP reserved for it, a script is copied to the Secondary DC using New-PSSession and the script is executed in the Secondary DC. I'm unsire how PXEBoot can be used for this.. Thanks..
You probably could use some "semi clever" scheduled task on primary DC to run often to check for existence of "remote" IP (which you know exactly what it would be, as it is your reservation) or even better, to check if DHCP issued IP (some clever parsing of DHCP Server service debug logs) and then double confirm the existence of "remote" IP & then carry on doing whatever you want/need