title: Change the hostname using the batch script
body: <p>Hi i wanted to change the value of hostname for new computer but things didn't work as i try to input the value and getting the value for the hostname. I try to restart the computer the result is still the same.. I am testing to see whether this script is capable of updating the hostname for pcs or computer name</p>
  
  <p>thanks</p>
  
  <p>here is my code</p>
  
  <pre><code>REM This script runs in MS-DOS Batch File Language 
  
  @echo off
  set /p id= Enter ID or Hostname: 
  echo %id%
  
  WMIC computersystem where caption='%ComputerName%' rename %id%
  
  
  REM exit the applications
  echo "Export completed successfully. Press any key to exit"
  pause &gt;nul
  exit /B
  </code></pre>