Quantcast
Channel: Configuration Manager 2012 - Operating System Deployment forum
Viewing all articles
Browse latest Browse all 9126

Detecting a "known system" in Windows PE

$
0
0

I'm using using the "Only media and PXE (hidden)" option to deploy some task sequences to known and unknown computers.

Unfortunately I have to know if it is unknown or known *before* I assign them the task sequence, which means I have to pre-determine this, I would assume, by doing some sort of a Native SQL call.  I haven't been able to do WQL queries in WinPE.

Right now I'm getting the MAC Address, and doing a SELECT statement like this:

SELECT Count(*) FROM v_GS_NETWORK_ADAPTER_CONFIGUR A RIGHT JOIN _RES_COLL_SMS00001 B on A.ResourceID = B.MachineID WHERE A.MACAddress0 = '$MACAddress'

If Count is greater than 0, it's a known system, and use the known advertisement.  Otherwise use the advertisement for Unknown.

It works "most of the time", but for instance, I have a machine right now which had gotten renamed at some point and I'm still getting a result from this query (with the old machine name), even though in the console, nothing is there, on either name.

Is there a better, more reliable way of determining whether or not a machine will be flagged as unknown during WinPE phase?



Viewing all articles
Browse latest Browse all 9126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>