通过WMIC命令远程打开远程计算机的远程桌面(Remote Desktop)功能
虽然标题有点拗口,不过这个命令确实挺有用的。
往往辛辛苦苦装了一台Server,回到家里本想远程桌面爽一下,却忘了打开远程的功能,这时这条命令就有用了。
昨天在一台Server上用了招行的网上银行专业版,然后忘了重新打开远程桌面(该软件为了“保证安全”,居然每运行一次都会强行关闭远程桌面功能……),回到家才意识到问题……。这时该命令也非常有用。
wmic /node:"[full machine name]" /USER:"[domain]\[username]"
PATH win32_terminalservicesetting WHERE (__Class!="") CALL SetAllowTSConnections 1
.csharpcode, .csharpcode pre { font-size: small; color: rgba(0, 0, 0, 1); font-family: consolas, “Courier New”, courier, monospace; background-color: rgba(255, 255, 255, 1) }
.csharpcode pre { margin: 0 }
.csharpcode .rem { color: rgba(0, 128, 0, 1) }
.csharpcode .kwrd { color: rgba(0, 0, 255, 1) }
.csharpcode .str { color: rgba(0, 96, 128, 1) }
.csharpcode .op { color: rgba(0, 0, 192, 1) }
.csharpcode .preproc { color: rgba(204, 102, 51, 1) }
.csharpcode .asp { background-color: rgba(255, 255, 0, 1) }
.csharpcode .html { color: rgba(128, 0, 0, 1) }
.csharpcode .attr { color: rgba(255, 0, 0, 1) }
.csharpcode .alt { background-color: rgba(244, 244, 244, 1); width: 100%; margin: 0 }
.csharpcode .lnum { color: rgba(96, 96, 96, 1) }