The Power in the Shell - Remoting
PowerShell remote這個功能很不錯,它可以允許用戶在本機的PowerShell console上創建remote PowerShell session直接執行命令,簡單的說就是你不用進入其它server的系統,就能夠遠程執行PowerShell命令。
前提是你要開啓remote這個功能。
看看具體命令:Enter-PSSession -ComputerName dc
按下Enter鍵,看看有什麼不同?對,已經切換到遠程服務器名稱爲dc的服務器上了,在這個時候,你輸入的任何PowerShell命令,得到的結果都是dc這臺服務器上的。
其實這個就類似於RDP到某臺server上
mstsc /v:dc