When administering multiple domains, forests often have to run a command line CMD from different users. Previously, I always confused: what CMD from which user is running? Then came the idea to sign the title of the CMD command line username and domain. This can be done as follows:
1. Create or modify a registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor" AutoRun (REG_SZ)
2. Add to the value of the command @title %userdomain%\%username%
for example, this can be done by running the command
1. Create or modify a registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor" AutoRun (REG_SZ)
2. Add to the value of the command @title %userdomain%\%username%
for example, this can be done by running the command
reg add "HKLM\SOFTWARE\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "@title "%""userdomain%\%""username%"" /f
No comments:
Post a Comment