How to prevent optional PXE Adv from popping on clients

Once of the glaring deficiencies of SCCM OSD deployment (in my opinion of course) is the default behavior of an optional PXE advertisement.  Effectively if you want to have more than one pxe advertised task sequence the one that you DIDN’T execute will eventually pop up on every machine that has not run it before as an optional advertisement.  If the user clicks it and tries to run it (assuming your task sequence is set to do so) it will fail as it should be designed to only run within Windows PE.  Not a concern from a user accidentally rebuilding their own pc however not a viable option to have this popup on everyone and thus freak out the organization.  Well fortunately I have discovered a workaround for this issue.  It’s quite simple actually.  😉

This is assuming you have your “PXE” TS adverts and your “Push” TS Adverts separated.
*ALWAYS test any new changes in a lab environment prior to production implementation*
Right-Click your PXE advertisement and go to Properties.
Click the Advanced tab.
Select the radio button “This task sequence can only run on the specified client platforms”
Now find a platform that you will not have in your environment.  In my case I have selected “x64 Windows XP Professional SP1”.  I should not have this OS version on my network.  If I do it’s unsupported and the machine needs to be rebuilt as we currently do not support ANY x64 OS’s.  😉
Give that several minutes to propagate the changes.
You can then turn off the mandatory advertisement.  Your client will receive the advertisement however they will reject it based on the platform restriction.  This has no effect on your PXE building since the platform is not evaluated as part of the PXE build process.

You can now have multiple PXE adverts.  This is invaluable for testing build updates, etc.

One thing to keep in mind is that when you make your adverts optional the auto PXE boot (after selecting the network card as your boot device) goes away and you must press F12 (again) to initiate the connection.

I have found a workaround for this in my environment however the big disclaimer here is that this is NOT a supported solution from Microsoft.

F12 workaround:
On your WDS server(s) navigate to
D:\RemoteInstall\SMSBoot\x86
Make a copy of your pxeboot.com (the version that prompts you to press F12)
Delete the original pxeboot.com
Make a copy of pxeboot.n12 (the version that bypasses the additional F12 prompt)
Rename this copy to pxeboot.com
Flag this file as READ-ONLY.  If you do not do this the next reboot of your server will revert this file back.
Restart your WDS service and away you go.

Hope this helps someone else out there!!

Advertisements

6 thoughts on “How to prevent optional PXE Adv from popping on clients

  1. YOU…ARE…MY…SAVIOUR….:)

  2. Hehe…glad I could be of service!

  3. After running this procedure, I have found that the machines that ARE in this collection (“Images for PXE” here) can use PXE one time before they receive the dreaded “Abort PXE”. Do you know of a way to let *any* workstation be re-imaged from PXE without having to “clear last Ad” or deleting the machine & restarting WDS?
    Any help you can pass along would be greatly appreciated.

    Thank you in advance,

    RR

    • I do! I have a vbscript that runs as a scheduled task on my SCCM server (every 10 minutes) to auto clear last pxe advert (careful of word wrapping):

      Dim server
      server = “SERVERNAME”

      ‘On Error Resume Next

      Dim net
      Dim localConnection
      Dim swbemLocator
      Dim swbemServices
      Dim providerLoc
      Dim location

      Set swbemLocator = CreateObject(“WbemScripting.SWbemLocator”)

      swbemLocator.Security_.AuthenticationLevel = 6 ‘Packet Privacy.

      ‘ If the server is local, don’t supply credentials.
      Set net = CreateObject(“WScript.NetWork”)
      If UCase(net.ComputerName) = UCase(server) Then
      localConnection = true
      userName = “”
      userPassword = “”
      server = “.”
      End If

      ‘ Connect to the server.
      Set swbemServices= swbemLocator.ConnectServer _
      (server, “root\sms”,userName,userPassword)
      If Err.Number0 Then
      Wscript.Echo “Couldn’t connect: ” + Err.Description
      Connect = null
      ‘Exit Function
      End If

      ‘ Determine where the provider is and connect.
      Set providerLoc = swbemServices.InstancesOf(“SMS_ProviderLocation”)

      For Each location In providerLoc
      If location.ProviderForLocalSite = True Then
      Set swbemServices = swbemLocator.ConnectServer _
      (location.Machine, “root\sms\site_” + _
      location.SiteCode,userName,userPassword)
      If Err.Number0 Then
      Wscript.Echo “Couldn’t connect:” + Err.Description
      Connect = Null
      ‘Exit Function
      End If
      Set Connect = swbemServices
      ‘Exit Function
      End If
      Next
      ‘Set Connect = null ‘ Failed to connect.

      collectionID = “P0100027”
      WScript.Echo collectionID

      ‘On Error Resume Next
      Dim collection

      ‘ Get the collection.
      Set collection = connect.Get(“SMS_Collection.CollectionID='” & collectionID & “‘”)
      result = collection.ClearLastNBSAdvForCollection

      if Err.number 0 Then
      WScript.Echo “Failed to clear PXE advertisement for collection: ” & collectionID
      ‘Exit Sub
      Else
      WScript.Echo “Cleared PXE advertisement for collection: ” & collectionID
      End If

  4. Really a good work around…we have implemented the same logic in our environment

  5. Pingback: How to Skip F12 When PXE Boot - Rui Qiu's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s