Windows Server logging 3389 Remote Desktop IP policy _win server

Source: Internet
Author: User
Tags echo date
3389IP Log path is C:\WINDOWS\PDPLOG\RDPlog.txt
Program code
Copy Code code as follows:

MD C:\WINDOWS\PDPLOG
echo date/t ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
echo time/t ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
echo Netstat-n-P TCP ^| Find ": 3389" ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
echo Start Explorer >>c:\windows\pdplog\pdplog.cmd

:: Add users each time to enter the Remote Desktop automatically record the use of IP, can be used to find the hacker traces!
REG ADD "hkey_local_machine\system\controlset001\control\terminal server\winstations\rdp-tcp"/V finheritinitialprogram/t reg_dword/d "00000000"/F
Reg ADD "hkey_local_machine\system\controlset001\control\terminal server\winstations\rdp-tcp"/V workdirectory/t REG _SZ/D C:\WINDOWS\PDPLOG\/F
REG ADD "hkey_local_machine\system\controlset001\control\terminal server\winstations\rdp-tcp"/V initialprogram/t REG_SZ/D "C:\WINDOWS\PDPLOG\PdPLOG.CMD"/F
REG ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal server\winstations\rdp-tcp"/V finheritinitialprogram/t reg_dword/d "00000000"/F
REG ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal server\winstations\rdp-tcp"/V WorkDirectory/ T reg_sz/d C:\WINDOWS\PDPLOG\/F
REG ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal server\winstations\rdp-tcp"/V InitialProgram /t reg_sz/d "C:\WINDOWS\PDPLOG\PdPLOG.CMD"/F

Echo Log Remote Desktop IP policy complete! Please press any key to exit!
PAUSE >nul
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.