Posted on 2012-09-05
Last Modified: 2012-09-05
Hello Experts,

   What's the best way to run a scan on my network to find out which machines have Auto Logon enabled on them?  

   I have SCCM 2007 (Config Manager Report Viewer) can I view this through that utility? If so, where do I need to drill down to to see this option?  Thanks for your help.
Question by:itsmevic
    LVL 9

    Accepted Solution

    AFAIK that's a local settings which probably will not show up in any network report.
    LVL 21

    Expert Comment

    You would need to read every computer registy for this value.

    Windows NT\

    AutoAdminLogon = 1

    const HKEY_CURRENT_USER = &H80000001
    const HKEY_LOCAL_MACHINE = &H80000002
    strComputer = "."
    Set StdOut = WScript.StdOut
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
     strComputer & "\root\default:StdRegProv")
    strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
    strValueName = "HistoryBufferSize"
    oReg.GetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
    StdOut.WriteLine "Current History Buffer Size: " & dwValue 
    strKeyPath = "SOFTWARE\Microsoft\Windows Script Host\Settings"
    strValueName = "AutoAdminLogon"
    oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
    If strvalue = 1 then
    StdOut.WriteLine "Current WSH Auto Logon Value is enabled"
    end if

    Open in new window

    Now you will need to leverage WMI to connect to the remote computer and gather this.
    You would want to modify the Strcomputer value to match a netbios computer name.
    If you have a list computer  name you can loop through the list with a ForEach statement ot gather the info.

    If you like I can work one up for you.
    LVL 21

    Expert Comment

    What No Points.
    I gave you a legitimate answer.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How does your email signature look on mobiles?

    Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

    Email signature management is something that is often overlooked in many organizations or is simply not implemented effectively. Let's take a look at what methods are available for managing this important piece of corporate branding.
    Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
    This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now