Hey guys

I need your help.
I want to create a vbscript or similar to be able to update computer descriptions for selected computers with the service tag. 
I have been searching around for a solution, and the only one I have found is a logon script through the AD: https://4sysops.com/archives/automatically-fill-the-computer-description-field-in-active-directory/#comment-291126

As I really want to be able to do it through KACE, for different reasons, I really hope some of you can help me :-)

0 Comments   [ + ] Show Comments


Please log in to comment


You can set computer description with this command run as an administrator in a Kscript:

net config server /srvcomment:"your_computer_description"

You can return the service tag using: wmic bios get serialnumber

If you wanted to script it further outside of the K1000 to pull the service tag, I'd start here: http://blogs.technet.com/b/heyscriptingguy/archive/2005/12/07/how-can-i-change-the-description-for-a-computer.aspx

Here's an older ITNinja article that might be helpful also: http://www.itninja.com/question/how-to-change-computer-name-computer-description-using-k1000

Answered 05/08/2015 by: jknox
Red Belt

Please log in to comment
I know this is an old post but I use this one to set the local computer description to the Service tag and model # of the PC. Remove name in the wmic command if you just want the service tag

@echo off
SetLocal EnableDelayedExpansion
set count=0
for /F "delims=," %%a in ('"wmic csproduct get identifyingnumber,Name"')do (
  set compdesc=%%a
  set /a count=!count! + 1
  if !count! GTR 1 goto rename
net config server /srvcomment:"Service Tag: %compdesc%"
Answered 02/12/2016 by: johnbodden
White Belt

  • Hey John. I fixed it myself with a batch file:

    REM set variables
    set serialnumber=

    REM Get Computer Serial Number
    FOR /F "tokens=2 delims='='" %%A in ('wmic Bios Get SerialNumber /value') do SET serialnumber=%%A

    @reg add HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters /v srvcomment /t reg_sz /d #"%serialnumber%" /f

    goto END

    echo Error...Invalid Operating System...
    echo Error...No actions were made...
    goto END

Please log in to comment
You can do it with a batch file, however, just like the manual method of changing the name of a computer; a reboot will be required afterwards.

set PC=ch-newcomputername
wmic path win32_computersystem where "Name='%computername%'" CALL rename name='%PC%'
Answered 05/06/2015 by: FSU Facilities
Senior White Belt

  • Thanks! What about computer description?
Please log in to comment
What about the computer description?
Answered 05/06/2015 by: HQgeN
Senior White Belt

Please log in to comment
Answer this question or Comment on this question for clarity