Answered Save SLMGR /DLI Output to Text File

  • Friday, February 01, 2013 4:40 PM
     
     

    I am trying to create a script to use the SLMGR /DLI command to export the chunk of the license key to a text file which would then be synced to a server.Long story short this is in an effort track license keys for our volume license.

    I am not sure if there is a way around this as the command opens a window and simply using SLMGR /DLI > C:\textfile.txt creates a text file but it is blank.

    Any suggestions? Thanks for the help.

All Replies

  • Friday, February 01, 2013 6:47 PM
     
     Answered

    The reason the file is blank is probably because VB scripting host is Windows scripting host (WSCRIPT) instead of Console (CSCRIPT).

    You should run command:

    cscript C:\Windows\System32\slmgr.vbs /dli > \\Server\Share\%computername%.txt
    • Marked As Answer by jrasmussencee Friday, February 01, 2013 10:26 PM
    •