Set Server Properties

Version 2

    This script can be used to gather the following information and set the equivalent server properties against a Windows server:


       PHYSICAL_CPUS - The number of physical CPUs on the target host (vs. hyperthreaded)

       SYSTEM_MODEL - The System Model (VMWare, etc...)

       OS_NAME - The OS Name

       WIN_PRODUCT_ID - The Windows OS Product ID

       WIN_PRODUCT_KEY - The Windows Product Key

       SQL_PRODUCT_ID - The SQL Server Product ID (if installed)

       SQL_PRODUCT_KEY - The SQL Server Product Key (if installed)


    This script utilizes msinfo32.exe and two free Windows utilities called htdump.exe and ProduKey.exe (which are included in this document).  Each attachment is a ZIP of an export directly from Config Manager, so you only need to extract the files and import them into the depot.


    Instructions for use:


    1) Download, extract, and import htdump and ProduKey ZIP files into the depot.  These files need to be deployed against every target host you wish to run this script against.


    2) Download, extract, and import the Set Server Propterties ZIP into the depot


    3) Create a NSH script job and specify values for all of the required properties.  These include whether or not you want to check for the types of data specified above.  This is useful, for example, when you only want to gather physical CPU information in your environment.


    NOTE: I have included exports for version 7 which uses different blcli calls.  Use the relevant version depending on the version of your app server.