1) 開始—運行,輸入tsconfig.msc,打開遠程桌面主機會話配置。右鍵RDP-Tcp,屬性。
“常規”選項卡,安全性,安全層更改為“SSL (TLS 1.0)”,加密級別設為“高”。
(2) 開始—運行,輸入“gpedit.msc”,打開本地組策略編輯器。
計算機配置\管理模板\Windows 組件\遠程桌面服務\遠程桌面會話主機\遠程會話環境
從“關機”對話框刪除“斷開連接”選項
●啟用 在“關機”對話框中刪除“關機”和重新啟動。以防止不熟悉的管理員意外把遠程桌面服務器關機或重啟。
●禁用 “關機”對話框無改變
這個功能非常有用,特別是公司的域管理員比較多時,你負責遠程桌面服務器的管理,你不想別的管理員因為不小心把這台服務器關閉時,可以啟用此選項。不過這並不影響你使用命令來關機和重啟。
重啟服務器命令:shutdown –r -f –t 0 (強制計算機立即重啟)
關閉服務器命令:shutdown –s -f –t 0 (強制計算機立即關機)
(3) 更改控制面板類文件的權限
● 取得c:\windows\system32\*.msc文件的所有權為administrats組。在目錄c:\windows\system32\*.msc默認的文件所有者為TrustedInstaller。
takeown /F c:\windows\system32\*.msc /A
注意:運行這個命令必須以本地計算機的administrator帳號運行才能成功。如果以域管理員運行,即使加入了本地管理員組,執行命令顯示成功,也不能取得文件所有者。
● 刪除c:\windows\system32\*.msc文件的的所有權限。
我使用Xcacls.vbs腳本來刪除Users組對c:\windows\system32\*.msc文件的所有權限,使用方法及下載,請看我的博客文章:
http://hi.baidu.com/longx5/blog/item/9ba3ce57c9970eceb645ae4b.html
批處理命令:
for /R c:\windows\system32 %i in (*.msc) do cscript d:\xcacls.vbs %i /E /R "BUILTIN\users"
出現下面的錯誤提示:
Starting XCACLS.VBS (Version: 5.2) Script at 2009/12/31 13:57:19
************************************************
* Script not tested on this version of Windows *
************************************************
This script hasn't been tested on version "6.1" of Windows.
Currently, the script has been tested on the following:
Win2000, WinXP, Win2003
Previous versions of Windows NT can use:
"XCACLS.EXE" from the NT 4.0 Resource Kit.
For more recent versions, there may be an update to this script.
Please contact David Burrell (dburrell@microsoft.com)
Note: WMI must be installed for this script to function.
If you need to run this script on the current OS,
and you verified WMI is installed, do the following:
open this script in Notepad
search for Function IsOSSupported()
change this line:
Case "5.0", "5.1", "5.2"
to:
Case "5.0", "5.1", "5.2", "6.1"
Save the script.
Exiting script now.
Operation Complete
Elapsed Time: .078125 seconds.
Ending Script at 2009/12/31 13:57:19
看上面的提示:我們知道Xcacls.vbs在編寫時只有Win2000, WinXP, Win2003,因此對於Win2008不認識,提示中指明了修改的方法:
編輯文件Xcacls.vbs,查找Function IsOSSupported(),把這一行Case "5.0", "5.1", "5.2"更改為Case "5.0", "5.1", "5.2", "6.1"。這樣Xcacls.vbs就可以識別Win2008了。
Xcacls.vbs也可以對整個文件夾或者磁盤的用戶權限進行修改,但對於一個目錄及子目錄下特定的一組文件進行權限修改無效,因此使用了for命令遞歸實現。For命令的參數,好多文章中都寫了應該使用%%i,但在命令行執行時會提示:“此時不應該有%%i”,把%%i更改為%i就可以。如果在一個批處理文件中使用%%i也是可以的,讀者可以自己測試。