This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo This script is to add a domain account in Admin group on the local machine. | |
pause | |
set /p var=Please input the target domain account: | |
net localgroup administrators %var% /add | |
pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo This script is to rename your computer name. | |
pause | |
setlocal enableextensions enabledelayedexpansion | |
set oldname= | |
for /f "usebackq" %%i in (`hostname`) do set oldname=%%i | |
set /p newname=Please input your NEW computer name: | |
netdom renamecomputer !oldname! /newname:%newname% /force /reboot:5 | |
endlocal | |
pause |
NewerOlder