• How to determine SMS thread causing high CPU; An oldie but a goodie!

    You can't call yourself a hardcore SMS admin unless you have been thru this exercise at least once. Apparently this Q was pulled from the MS KB (no idea why) but here it is.

     

    How to Determine SMS Thread Responsible for High CPU Use [sms] Q234508

    This article has been retired off of Microsoft’s KB archive.  This technique works perfectly for SMS 2003 and several other server applications.  I thought posting it here again would be more useful and searchable.
     
    SMS: How to Determine SMS Thread Responsible for High CPU Use [sms]
    ID: Q234508    CREATED: 03-JUN-1999   MODIFIED: 30-JUN-2000
    winnt:2.0
    winnt
    PUBLIC | kbSMS200

    ======================================================================
    SUMMARY
    ======================================================================
    If System Management Server 2.0 or 2003 causes high processor utilization on the site server, there is a way to track the SMSEXEC thread responsible in order to begin troubleshooting the problem.

    MORE INFORMATION
    ======================================================================
    To determine the SMS thread responsible for high CPU utilization, run Performance Monitor from a remote server, and then add the counters in the following table:

    +------------------------------------------------------------------------+
    | Object    | Counter          | Instance(s)                             |
    +------------------------------------------------------------------------+
    | Processor | % Processor Time | <all instances>                         |
    +------------------------------------------------------------------------+
    | Thread    | % Processor Time | <all instances needed> example: smsexec |
    +------------------------------------------------------------------------+
    | Thread    | ID Thread        | <all instances needed>                  |
    +------------------------------------------------------------------------+
    | Thread    | Thread State     | <all instances needed>                  |
    +------------------------------------------------------------------------+
    Definition of Thread State:
       The current state of the thread:
       0 = Initialized
       1 = Ready
       2 = Running
       3 = Standby
       4 = Terminated
       5 = Wait
       6 = Transition
       7 = Unknown

       A Running thread is using a processor; a Standby thread is about to use one. A Ready thread wants to use a processor, but is waiting for a processor because none are free. A thread in Transition is waiting for a resource in order to execute, such as waiting for its execution stack to be paged in from disk. A Waiting thread has no use for the processor because it is waiting for a peripheral operation to complete or a resource to become free.

    Using Performance Monitor in Report (CTRL+R) view:
       Locate the column with the thread(s) using the greatest processor time(s) and note the ID Thread number.

    Using Performance Monitor in Chart (CTRL+C) view:
       Locate the line with the thread(s) using the greatest processor time(s), and note the Thread Instance.
       Locate the ID Thread counter with the same instance number. Highlight (right-click) that counter.
       The number in the boxes Last, Ave, Mix, and Max will all be the same. This is the ID Thread number.

    Convert the decimal version of the ID Thread (given on the report) to hex using the Calculator (Calc.exe).

    To begin troubleshooting the root of your high processor utilization, find the log file in the SMS\logs directory on your site server using the command Findstr /i <HexID>*.log.

    SQL Perf

    1) Setup Performance Monitor Logs:

    For every connection to SQL server, a new SPID (SQL Server Process Identifier) will be created.  For each SPID, a new thread of the SQLSERVER.EXE process is created, which is also given a KPID ("KPID" is the kernel-process ID. Under SQL Server for Windows this is the thread ID number, also known as "ID thread," and is assigned by Windows when the thread is created).

    A> To identify which threads of a process are causing high CPU utilization, perform the following steps (steps assume Windows 2000/XP):

    1.  On start menu, select 'Run', and type "Perfmon"
    2.  Ensure you have "System Monitor" selected.  If any counters are added by default, remove them from display.
    3.  In the toolbar, click the "+" to add counters to your display.
    4.  (select the proper machine if running perfmon against a remote machine)
    5.  Under "Performance Object", select 'Thread'
    6.  Accept the default choice for "Select counters from list", "%ProcessorTime"
    7.  Under "Select instances from list:", scroll down to the first SQL Server thread, displayed as "sqlservr/0".  Click on "sqlsrvr/0", then scroll down to the last SQL Server thread (may be different name), for example "sqlsrvr/9".   Hold down the "Shift" keyboard key, and click on the last instance, so that all SQL Server thread instances are selected.  You may wish to scroll up and down the list to verify that you have them all selected.  When you have all SQL Server thread instances selected, click "Add"
    8.  Click "Close" on the "Add Counters" dialogue box
    9.  Click the lightbulb icon on the toolbar to enable highlighting.
    10. In its idle state, all threads should use less than 5% processor utilization over time.  The counter line for the current thread selected should now be highlighted in the display.  If any threads display that they are significantly above 0% processor utilization over time, and do not seem to release the processor, note their "Instance" number.  This is referred to as the "Thread ID", and is the thread responsible for increased processor utilization by SQL Server.
    11. Minimize the performance monitor console.

    B> To identify which component of SMS is responsible for the increased SQL Server processor utilization, perform the following steps (steps assume Windows 2000/XP):

    1.  On start menu, select 'Run', and type "Perfmon"
    2.  Ensure you have "System Monitor" selected.  If any counters are added by default, remove them from display.
    3.  In the toolbar, click the "+" to add counters to your display.
    4.  (select the proper machine if running perfmon against a remote machine)
    5.  Under "Performance Object", select 'Thread'
    6.  Under "Select counters from list:", select "ID Thread"
    7.  Under "Select instances from list:", select all SQL Server Thread IDs noted above, in the previous step.  Note, you may have multiple thread ids identified.  If this is the case, then select the first thread id, then use "CTRL-Click" to select multiple other threads.  Click "Add" when all appropriate thread ids are selected.
    8.  Click "Close" on the "Add Counters" dialogue box.
    9.  For each Thread ID, there will be a value specified just under the graph display, such as "Last", "Average", etc.  Note the number in "Last".  This is the KPID of the thread.
    10. Minimize this instance of Performance Monitor.
    11. Launch the SQL Query Analyzer, attached to the target instance of SQL Server.
    12. Run the following query: select SPID, KPID, status, hostname, dbid, cmd from master..sysprocesses
    13. The results pane of the Query Analyzer should populate with the results of the query.  Note that for each SPID, there is a KPID.  Locate the KPID identified in step 9 above.  Note the SPID for each KPID identified in step 9.
    14. Run the following query: sp_who2.  Each row will contain a distinct SPID.  Locate the rows for each SPID identified above.  Scroll the results window the right, and note the "ProgramName" column.  The data contained in this column will identify BY NAME the component of SMS which has initiated a connection to the SQL Server to perform a work item.  You will see “ProgramName"s like "SMS_COLLECTION_EVALUATOR", which are the names of the threads within SMS that  would attach to the database.

    You have now identified which thread in SMS is causing the SQL server to "peg" the CPU(s) of the SQL Server. To see what the work item is that SMS is issuing to the SQL Server which is causing the performance issue, run the following query in Query Analyzer:

    DBCC INPUTBUFFER ( SPID ) for the SPID noted above.  The output, under the "Event Info" column will contain the first 255 characters of the TSQL in the work item.  This should give you clues as to what the SMS component is attempting to do which is pegging the processor(s) on the SQL Server.

    2) Monitor the ENT site to determine rather or not CPU is consumed at 100% for an extended amount of time. It’s normal at times for the CPU to spike to 100% as long as it is not for an extended period (this is subjective depending on your server). The goal here is to create a baseline by monitoring this server.

    Reference Articles:

    234508 SMS: How to Determine the SMS Thread Responsible for High CPU Utilization
    http://support.microsoft.com/?id=234508
    117559 INFO: How to Correlate Spid, Kpid, and Thread Instance
    http://support.microsoft.com/?id=117559
    121555 Compression Performance Tuning in Systems Management Server
    http://support.microsoft.com/?id=121555
    224587 HOW TO: Troubleshoot Application Performance with SQL Server
    http://support.microsoft.com/?id=224587
    150934 How to Create a Performance Monitor Log for NT Troubleshooting
    http://support.microsoft.com/?id=150934

  • what does this advertisement status message mean?

    here is the dump from  v_AdvertisementStatusInformation

    MessageID MessageState MessageStateName MessageName
    0 0 No Status No messages have been received
    10000 2 Rejected Program rejected (offer data integrity)
    10001 11 Failed Program rejected (package data integrity)
    10002 1 Accepted Program received
    10003 11 Failed Failed (bad environment)
    10004 11 Failed Program failed
    10005 9 Running Program started
    10006 11 Failed Program failed
    10007 11 Failed Program failed
    10008 13 Succeeded Program completed with success
    10009 13 Succeeded Program completed with success
    10018 2 Rejected Program rejected (wrong platform)
    10019 3 Expired Program expired
    10020 8 Waiting Program deferred due to slow link
    10021 11 Failed Program failed (unexpected restart)
    10022 12 Reboot Pending Program completed successfully (reboot pending)
    10023 5 Download in Progress Download Started
    10024 6 Download Complete Download complete
    10025 11 Failed Download failed
    10030 11 Failed Download failed - content mismatch
    10031 7 Cancelled Download cancelled
    10034 7 Cancelled Program cancelled by user
    10035 8 Waiting Waiting for content
    10036 8 Waiting Waiting for user condition
    10037 8 Waiting Waiting for another program
    10040 13 Succeeded Program will not rerun
    10041 4 Will Not Rerun Program will not rerun
    10042 4 Will Not Rerun Program will not rerun
    10045 10 Retrying Not enough space in cache
    10046 10 Retrying Unable to perform Windows Installer per-user elevation
    10050 11 Failed Cache too small
    10051 11 Failed Program failed (no content)
    10052 2 Rejected Program rejected (invalid policy)
    10053 11 Failed Program failed (download failed)
    10054 11 Failed Not enough space in cache
    10055 10 Retrying Retry (Bad environment)
    10056 10 Retrying Program failed (retrying)
    10057 11 Failed Program failed (download failed - content mismatch)
    10058 11 Failed Program failed (download/location failure)
    10060 10 Retrying Program retrying (no content)
    10061 10 Retrying Download failed (retrying)
    10062 10 Retrying Program retrying (download/location failure)
    10070 11 Failed Program failed (run time exceeded)
    10071 10 Retrying Program failed (retrying)
    10072 10 Retrying Program failed (retrying)
    10073 8 Waiting Waiting for a Service Window
    10074 11 Failed Program may never run due to Service Window Constraints
    10075 12 Reboot Pending Waiting for a Service Window to Reboot Machine
    10076 12 Reboot Pending Rebooted Machine Outside of Service Windows
    10077 8 Waiting Waiting for Content Availability on a local DP to run the Program from Network
    10078 11 Failed Failed to Run. Internet based system timed out waiting for a local network DP
    10079 11 Failed System may never Reboot due to Service Window Constraints
    10080 11 Failed Failed to Run. The Operating System Deployment Task Sequence cannot run while the client is on the Internet
    10800 14 Advanced Client Installed Advanced client successfully installed
    10802 14 Advanced Client Installed Advanced client successfully upgraded
    10809 14 Advanced Client Installed Advanced client successfully repaired
    11010 1 Accepted Device program policy received
    11020 1 Accepted Device program content request received
    11030 5 Download in Progress Device program download started
    11031 9 Running Device program download succeeded
    11032 11 Failed Device program download failed
    11035 13 Succeeded Device program execution succeeded
    11036 11 Failed Device program execution failed
    11100 21 Action Started OS installation successfully started an action
    11101 11 Failed OS installation action failed
    11102 13 Succeeded OS installation completed successfully
    11103 11 Failed OS installation failed to request distribution points from management point
    11104 11 Failed OS installation failed because there are no distribution points available
    11105 11 Failed OS installation failed to connect to the distribution point
    11106 15 Validation OS installation successfully started the Validation phase
    11107 16 State Capture OS installation successfully started the State Capture phase
    11108 17 Preinstall OS installation successfully started the Preinstall phase
    11109 18 Install OS installation successfully started the Install phase
    11110 19 Postinstall OS installation successfully started the Postinstall phase
    11111 20 State Restore OS installation successfully started the State Restore phase
    11120 9 Running The task sequence execution engine skipped a disabled group
    11121 9 Running The task sequence execution engine failed evaluating the condition for a group
    11122 9 Running The task sequence execution engine skipped a group because the condition was evaluated to be false
    11123 9 Running The task sequence execution engine evaluated TRUE for the condition of a group
    11124 9 Running The task sequence execution engine started a group
    11125 9 Running The task sequence execution engine ignored execution failure in a group
    11126 9 Running The task sequence execution engine aborted execution for a failure in a group
    11127 9 Running The task sequence execution engine successfully completed execution of a group
    11128 9 Running The task sequence execution engine skipped a disabled action
    11129 9 Running The task sequence execution engine failed evaluating the condition for an action
    11130 9 Running The task sequence execution engine skipped an action because the condition was evaluated to be false
    11131 9 Running The task sequence execution engine evaluated TRUE for the condition of an action
    11132 9 Running The task sequence execution engine failed to start an action
    11133 9 Running The task sequence execution engine successfully started an action
    11134 9 Running The task sequence execution engine successfully completed an action
    11135 9 Running The task sequence execution engine failed executing an action
    11136 9 Running The task sequence execution engine received an external shutdown request during execution of an action
    11137 9 Running The task sequence execution engine timeout in executing an action
    11138 9 Running The task sequence execution engine ignored execution failure of an action
    11139 9 Running The task sequence execution engine aborted execution for a failure of an action
    11140 9 Running The task sequence execution engine started execution of a task sequence
    11141 11 Failed The task sequence execution engine failed execution of a task sequence
    11142 9 Running The task sequence execution engine performed a system reboot initiated by an action
    11143 13 Succeeded The task sequence execution engine successfully completed a task sequence
    11170 11 Failed The task sequence manager could not successfully complete execution of the task sequence
    11171 13 Succeeded The task sequence manager successfully completed execution of the task sequence
    11200 101 Failed Invalid command line syntax or value
    11201 101 Failed Could not retrieve assignment schedule
    11202 101 Failed Could not load authorization list
    11203 101 Failed Could not locate scan tool cache
    11204 101 Failed Attempt to run the scan tool failed
    11205 101 Failed Error loading data from WMI.
    11206 101 Failed Error writing data to WMI
    11207 101 Failed Could not open resource DLL.
    11250 103 Retrying Waiting for next advertisement recurrence (change window missed, early start)
    11251 103 Retrying Waiting for next advertisement recurrence (change window missed, late start)
    11252 104 Postponed Installation was rescheduled by the user
    11253 104 Postponed Installation was postponed by the user
    11254 104 Postponed Installation was postponed automatically
    11255 103 Retrying Installation summary
    11256 103 Retrying Waiting for next advertisement recurrence (change window missed, duration expired)
    11257 103 Retrying Pre-install reboot was rescheduled by the user
    11258 103 Retrying Pre-install reboot was postponed by the user
    11259 102 Reboot pending Pre-install reboot was postponed automatically
    11260 102 Reboot pending Pre-install reboot was initiated.
    11261 102 Reboot pending Installation completed and reboot was rescheduled by the user
    11262 102 Reboot pending Installation completed and reboot was postponed by the user
    11263 102 Reboot pending Installation completed and reboot was postponed automatically
    11264 100 Success Installation completed and a reboot was initiated
    11265 100 Success Installation completed and forced reboot was initiated
    11266 102 Reboot pending Installation completed and reboot was suppressed for the workstation role
    11267 102 Reboot pending Installation completed and reboot was suppressed for the server role
    11268 100 Success Installation agent completed and reboot was not needed
    11269 103 Retrying Pre-install reboot is needed for installation to continue
    11270 102 Reboot pending Reboot of the computer is required.
    11300 107 Preliminary Success Installation was successful and a reboot was not indicated
    11301 102 Reboot pending Installation was successful and a reboot is needed for the update to take effect
    11302 101 Failed Software update failed to install
    11303 103 Retrying Installation has timed-out
    11304 103 Retrying Installation was cancelled by the user
    11306 101 Failed Installation failed because of insufficient disk space
    11307 107 Preliminary Success Installation was successful and a reboot was not indicated
    11308 102 Reboot pending Installation was successful and a reboot is needed for the update to take effect
    11309 107 Preliminary Success Installation was successful and a reboot was not indicated (enforcement date met)
    11310 102 Reboot pending Installation was successful and a reboot is needed for the update to take effect (enforcement date met)
    11400 101 Failed Cannot access temp folder
    11401 101 Failed Unsupported operating system version
    11402 101 Failed Cannot access cache folder or no administrative rights available
    11403 101 Failed Unsupported version of Internet Explorer
    11404 101 Failed Insufficient disk free space (10mb required)
    11405 101 Failed Scan results not found
    11406 101 Failed Scan failed to update WMI
    11408 105 Install Verified Status has changed to installed
    11409 106 Uninstalled Status has changed to not installed
    11410 101 Failed Unable to read configuration file
    11411 101 Failed Unable to meet requirements
    11412 101 Failed Unable to execute
    11413 101 Failed Unable to expand file
    11414 101 Failed Unable to locate scan.ini
    11415 100 Success Scan started
    11416 101 Failed Failed to start scan
    11417 100 Success Scan completed successfully
    11418 101 Failed Scan didn't finish in the expected time
    11419 100 Success Scan waiting for contents
    11420 101 Failed Scan content download failed
    11421 101 Failed Total cache size is insufficient to download the Scan contents
    11422 101 Failed Current available cache size is insufficient to download the Scan contents
    11423 101 Failed Scan failed
    11424 101 Failed Update Source registration failed
    11425 101 Failed Scan request with Legacy Scanner is rejected
    11426 106 Success Scan succeeded with some extended scan errors
    11450 101 Failed SMS Site Code is not specified.
    11451 101 Failed Package ID is not specified.
    11452 101 Failed SMS Site name is not specified.
    11453 101 Failed Package source folder is not specified.
    11454 101 Failed Unable to write to package source folder.
    11455 101 Failed Unable to read from package source folder.
    11456 101 Failed Unable to download catalog
    11457 100 Success Catalog download completed successfully
    11458 101 Failed Unable to update Distribution Points
    11459 101 Failed Unable to update site database from catalog
    11460 100 Success Sync operation completed successfully without catalog update
    11461 101 Failed The content downloaded can't be trusted, unable to verify the certificate attached to the content, or no certificate was attached
    11462 101 Failed An existing or higher version of a scan tool is already installed at a parent site in the hierarchy
    11500 51 Informational Version of device client on attached device is newer. No action taken.
    11501 51 Informational No device client action specified. No action taken.
    11502 51 Informational Device client installation completed successfully.
    11503 51 Informational Device client upgrade completed successfully.
    11504 51 Informational Installed device client state verified and settings enforced.
    11505 51 Informational Device client uninstallation completed successfully.
    11506 51 Informational Device client installation completed successfully and certificate enrollment was not required.
    11507 51 Informational Device client upgrade completed successfully and certificate enrollment was not required.
    11508 51 Informational Installed Device client state verified, settings enforced and certificate enrollment was not required.
    11510 52 Warning Device client installation completed successfully. Certificate installation and/or enrollment failed. Check DmInstaller.log on the Device Client for detailed error information.
    11511 52 Warning Device client upgrade completed successfully. Certificate installation and/or enrollment failed. Check DmInstaller.log on the Device Client for detailed error information.
    11512 52 Warning Installed device client state verified and settings enforced. Certificate installation and/or enrollment failed. Check DmInstaller.log on the Device Client for detailed error information.
    11520 53 Error Device client deployment action failed
    11521 53 Error Device client deployment action failed
    11522 53 Error Device client deployment action failed
    11523 53 Error Device client deployment action failed
    11524 53 Error Device client deployment action failed
    11525 53 Error Device client deployment action failed
    11526 53 Error Device client deployment action failed
    11527 53 Error Device client deployment action failed
    11528 53 Error Device client deployment action failed
    11529 53 Error Device client deployment action failed
    11530 53 Error Device client deployment action failed
    11540 53 Error Device client deployment action failed
    11541 53 Error Device client deployment action failed
    11542 53 Error Device client deployment action failed
    11550 53 Error Device client installation or upgrade failed. Error during uninstallation of previous client.
    11551 53 Error Device client installation or upgrade failed. Invalid client settings file.
    11552 53 Error Device client installation or upgrade failed. Error installing client CAB file.
    11553 53 Error Device client installation or upgrade failed. Error starting client service.
    11554 53 Error Device client installation or upgrade failed. Error updating client settings.
    11555 53 Error Device Client Deployment failed with unknown error.
    11560 53 Error Device client verification or repair failed. Error during uninstallation of previous client.
    11561 53 Error Device client verification or repair failed. Invalid client settings file.
    11562 53 Error Device client verification or repair failed. Error installing client CAB file.
    11563 53 Error Device client verification or repair failed. Error starting client service.
    11564 53 Error Device client verification or repair failed. Error updating client settings.
    11565 53 Error Device client verification or repair failed. Error restoring required files.
    11566 53 Error Device client privileged certificate installation failed.  Device may have a security policy which prevents the client installer from installing certificates into the privileged and SPC certificate stores.
    11567 53 Error Encountered unknown error installing the device client.
    11568 53 Error Device client setup failed to launch during install.
    11570 53 Error Device client uninstallation failed. Error using unload.exe to uninstall the existing client.
    11571 53 Error Device client install/upgrade failed. Error enforcing new client. Device rolled back to old client (if existed before).
    11572 53 Error Device client rollback failed during unsuccessful upgrade. Error enforcing old client. Need to freshly install the client.
    11573 53 Error Device client failed to perform post cab install actions. Device client installation failed.
    11700 101 Failed Scan Tool for this update is not available
    11701 101 Failed Scan Tool for this update failed
    11702 101 Failed The contents hash for this update provided in policy does not match with the contents downloaded
    11703 101 Failed The contents for this update could not be located
    11704 101 Failed Contents size for this update exceed free cache size available
    11705 101 Failed Contents size for this update exceed total cache size available
    11706 101 Failed Failed to download contents for this update
    11707 101 Failed This Update cannot be attempted due to invalid commandline
    11708 101 Failed This Update application failed
    11709 101 Failed This Update did not finish in allocated time
    11710 101 Failed Creation of process failed for this update
    11711 101 Failed Failed to get installer path for this update
    11712 101 Failed Failed to monitor process for this update after service restart
    11713 101 Failed SMS internal error occurred for this update
    11714 101 Failed Bundle update failed to get content for this update
    11715 101 Failed Bundle update failed to install this update
    11716 101 Failed Bundle update failed to evaluate the applicability of its leaf updates
    11717 101 Failed No current or future maintenance window is available to accomodate this update with max runtime
    11750 101 Failed Updates enforcement job failed for this assignment
    11751 101 Failed Updates failures occured during enforcement of this assignment
    11752 101 Failed Some updates are still non-compliant after enforcemet completion of this assignment
    11753 101 Failed Post restart updates compliance checking failed
    11754 101 Failed Failed to initiate enforcement of this assignment
    11755 101 Failed Failed to initiate updates evaluation for this assignment
    11756 101 Failed Updates evaluation job completed with failure for this assignment
    11757 101 Failed Invalid policy received for this assignment
    11758 101 Failed Failed to initiate updates advance download for assignment
    11759 101 Failed Updates advance download job completed with failure for assignment
    11760 101 Failed No maintenance window is defined to accommodate at least one update in the deployment
    11800 230 Failed Failed to download baseline CI.
    11801 230 Failed The contents hash for the baseline CI provided in policy does not match with the contents downloaded.
    11802 230 Failed Cannot further process the baseline CI. Managed client does not have the .Net framework version 2.0 installed.
    11850 230 Failed Failed to download baseline CI content.
    11851 230 Failed The contents hash for the baseline content provided in policy does not match with the contents downloaded.
    11852 230 Failed Failed to evaluate baseline content.
    11853 230 Failed Failed to report compliance state for baseline content.
    11858 230 Failed Baseline CI could not be decompressed.
    11859 230 Failed Baseline content could not be decompressed.
    11860 230 Failed Internal error - cannot further process baseline content.
    11861 230 Failed Internal error - cannot further process baseline CI.
    11862 230 Failed Failed to launch discovery process for baseline content.
    11863 230 Failed Discovery process crashed for baseline content.
    11864 230 Failed Baseline content has model violations.
    11865 230 Failed Baseline content encountered one or more errors during discovery.
    11866 230 Failed Download of baseline CI timed out.
    11867 230 Failed Download of baseline content timed out.
    65535 -1 Accepted - No Further Status Program received - no further status

  • Chassis type values in SCCM

     

    when 1 then 'Other'

     when 2 then 'Unknown'

     when 3 then 'Desktop'

     when 4 then 'Low Profile Desktop'

     when 5 then 'Pizza Box'

     when 6 then 'Mini Tower'

     when 7 then 'Tower'

     when 8 then 'Portable'

     when 9 then 'Laptop'

     when 10 then 'Notebook'

     when 11 then 'Hand Held'

     when 12 then 'Docking Station'

     when 13 then 'All in One'

     when 14 then 'Sub Notebook'

     when 15 then 'Space-Saving'

     when 16 then 'Lunch Box'

     when 17 then 'Main System Chassis'

     when 18 then 'Expansion Chassis'

     when 19 then 'SubChassis'

     when 20 then 'Bus Expansion Chassis'

     when 21 then 'Peripheral Chassis'

     when 22 then 'Storage Chassis'

     when 23 then 'Rack Mount Chassis'

     when 24 then 'Sealed-Case PC'

     

  • prompt for computer name in OSD task sequence

    Create a .vbs file called getcomputername.vbs or something like that.  Add these commands to the file:

     

    set env = CreateObject("Microsoft.SMS.TSEnvironment")

    Name = inputbox("Enter the name for the new computer" ,"Prompt for Computer Name:",env("_SMSTSMachineName"),400,0)

    env("OSDComputerName") = Name

     

    Create an SCCM package and point the package source to the source folder that you stored the .vbs file in.  You don’t need to create a program item, just the package.  Add it to the DPs.

     

    Edit your OSD task sequence and add a task to “Run Command Line”.   For the name use something like “Get Computer Name”.  For the command line use “cscript.exe getcomputername.vbs”  (get rid of the quotes).  Select the Package option and choose the package you built in the previous step.

     

    I added my Get Computer Name task sequence after the Partition Disk 0 task but I’m not sure it matters. 

     

    Advertise the task sequence

  • Inventory mapped drives in ConfigMgr 2012

    The ability to inventory mapped network drives was a common customer ask in ConfigMgr 2007 and SCCM Expert and some other folks provided free scripts and MOF edits to take care of this.  But can this be done in ConfigMgr 2012? 

    Mapped network drives and printers are a per-user setting so you need to run a script or process under the user’s context to grab that data and store it somewhere that the hardware inventory process can get to.  The obvious place to store the data is WMI.  There may be other scripts out there that do this and if you have a better way to do this in ConfigMgr 2012 please let me know, but I chose to use a script provided by CTS for ConfigMgr 2007 and it worked just fine in my lab.  Credit to Alvin Morales and JC Hornbeck for the blog article:

    http://blogs.technet.com/b/configurationmgr/archive/2008/12/18/configmgr-2007-how-to-inventory-mapped-drives.aspx

    Obviously in ConfigMgr 2012 we won't perform the MOF edits shown in the article, we make the change in the ConfigMgr 2012 console itself.  But the VB script provided (mapdrives.vbs is what they called it) is required.  Given the requirements that need to be met for this to work as a ConfigMgr package (run with user rights, run only when a user is logged on, set it to re-run on a schedule, etc) this may work better as a logon script.  You could also modify the VB script to inventory mapped printers as well.  You could further modify the script to force a hardware inventory once it’s done, or just wait for the next scheduled inventory to occur.

    Once you have created the package and deployed it to your clients, you can verify it worked by using WBEMTEST to connect to root\CIMV2 and look in CX_mappeddrives.

    clip_image002

    In the ConfigMgr 2012 console you’ll need to add the new class for hardware inventory.  So, Administration/Client Settings/Default Client Settings (or select a custom device settings group)/Hardware Inventory/Set Classes.  Click Add and use the Connect option to specify a client that now has the information stored in WMI and select the CX_mappeddrives class name.

    clip_image003

    Once the client has retrieved machine policy and submitted hardware inventory, you should be able to see the mapped drive data in Resource Explorer:

    clip_image005

    and you can confirm in the database:

    clip_image007