Washington DC Endpoint Management User Group

 View Only
Expand all | Collapse all

DS7.1 - Check if a Computer is Booted to PXE

  • 1.  DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 23, 2012 11:51 AM

    Is there a way to see if a computer is booted to the PXE environment? I was hoping to be able to query a table to return a list of computers that are booted to into WinPE and are waiting to do something.



  • 2.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 23, 2012 01:27 PM

    I'd have to dig around a bit, but I know we send up basic inventory every time the agent starts, which would include the OS, even though it wouldn't over-write the OS in the display for most computers.  I would expect we'd have a recording of that in basic inventory.  There may even be something related to Task that tracks this, but I'm not sure.

    If you're comfortable in our DB - dig around in the Basic inventory tables.  If not, the rest of us will help out here, but yeah, I would think this is possible.



  • 3.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 23, 2012 02:13 PM

    I have no problems digging through the CMDB. I knew you guys sent a basic inventory because 100% new machines will show up as MINWINPC in the computer list. However, if you delete a machine and then PXE boot it again, it never shows back up in the list. I see the orginal computer item listed in the ItemDeleted table but the PXE booted computer will not create a new active computer record. It will only show backup once the computer is booted back to windows and the full agent checks back in.

     

    I am building a Wizard in Workflow that our Help Desk will use to schedule client builds with software installs. Works great exept for this issue of re-using existing hardware for new users. The CSV file for predefined computers is STUPID. So trying to work around it by have the Help Desk PXE boot a computer first and then the wizard will display a list of WinPE booted computers for them to pick from to schedule the image job and software install tasks. Easy to do in DS6.9... PITA with 7.1.



  • 4.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 23, 2012 05:27 PM

    When I tried this:

    select
        upper(ws.[Name]) as 'Computer Name',
        SystemType as 'Architecture',
        ws.[OS Name] as 'PE'
    from dbo.Wrksta ws
    where ws.[OS Name] like '%Longhorn%'

    I got this:

    MININT-MKNAONE,Win32,Windows (TM) Code Name "Longhorn" Preinstallation Environment
    MININT-2P9HMFN,Win32,Windows (TM) Code Name "Longhorn" Preinstallation Environment

    Caveat Emptor - my SQL is based more on experimentation than actual knowledge...

    Zubin Chandran

    Missouri Botanical Garden



  • 5.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 23, 2012 05:45 PM

    When I booted up an existing machine it didn't flip the OS it stayed as Windows 7 Enterprise. If you delete a machine from the NS console it never shows up again until the full agent checks back in.



  • 6.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 23, 2012 11:57 PM

    What appears tob e happening is that if we detect an existing inventory, we do NOT send up any updated inventory data.

     

    Soooooo, at this time, you may have to tweak things, though I'm still looking because frankly this is a great request.  There WILL be a time when we'll know this at some future date, but until then, we need a work-around.

    At least one thing has come to mind.  There's a KB that teaches us how to do a custom inventory, which consists of, in short, a basic XML statement that is sent up to the server with information.  You could create a script that sends one of these NSE's to the NS and incorporate it into WinPE, which would populate your own dataclass that could then easily be queried.

    The trick is making the XML since the inventory agent is NOT present in automation, so you can't use their little short-cut method.  <sigh>

    I'll keep looking into it, since again, it's a great idea.



  • 7.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 24, 2012 10:22 AM

    I was thinking about that too but knew that the full invenotory agent wasn't in WinPE so couldn't figure out how I would do this. However if your run SET at the command prompt, you could use those variables to build the file. Lots of good custom variables we could use.

    Thought.... what about an agentless inventory with a forced update?



  • 8.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 24, 2012 11:38 AM

    I noticed brand new machines were not working in my production environment too. So I checked my PECTAgent.log on the PXE client and I get this error:


    <event date='Apr 24 15:06:40' severity='2' hostName='MININT-TI48D5N' source='AeXNetworkTransport' module='AeXNetComms.dll' process='PECTAgent.exe' pid='1840' thread='1844' tickCount='80937' >
      <![CDATA[Post to 'http://altirisdr.americancapital.com:80/Altiris/NS/agent/CreateResource.aspx' failed: Invalid data received in HTTP response. Expected 1233 bytes, received 0 (-2147024883)]]>
    </event>

     

    I dug in deeper and realized that I had configured my NS to require HTTPS and then manually went back and reset some of the sub sites that Automation uses to not require HTTPS. That way my software packages would still be published with HTTPS but Deployment would still work. (Got to love these work arounds dev team!)

    Thought I hit them all but it looks like I had to update this NS/Agent/ folder too as it was set to require HTTPS. After making this change my brand new PXE machine created a new record along with the machine I deleted.

    The SQL you posted above will do the trick and was something I had already implemented in my wizard. All this because DS and HTTPS don't want to play nice!

     

     



  • 9.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 24, 2012 11:43 AM

    But you're right for now - they don't like each other.

    The query supplied will work for any NEW computer, but not for previously managed computers that are being reimaged.  If all you need is for new ones, then yup, it'll be fine.

     

    In the mean time, because I like where your report is going, I'm working on a feature request to get SOMETHING into upcomming releases if possible.  Maybe a KB on how to do it today - we'll see.  No promises!



  • 10.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 24, 2012 12:04 PM

    Currently I would have to make sure our Help Desk removes computers from Altiris for them to be able to re-use them in PXE. This may cause problems down the road as they can be sloppy. It would be better to know what's booted into automation so you could just query that list.



  • 11.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 24, 2012 12:16 PM

    While I have your attention. Is there a way to test a machine to see if the automation folder already exists? Currently my image job is configured to use the Automation folder. However, there will be times when machines do not have this installed and need to use PXE. (For instance a new VM) I don't want to build two image jobs, one for PXE and one for Automation.



  • 12.  RE: DS7.1 - Check if a Computer is Booted to PXE

    Posted Apr 24, 2012 02:00 PM

    In theory, just using a conditional to check if C:\Boot exists should be good enough I'd think...