如何使用命令行界面管理远程 Windows Server?
当我还是一名 Linux 管理员时,我可以通过 SSH 命令行执行任何操作。 现在,作为一名 Windows 管理员,我必须处理 Windows 远程桌面图形界面,我发现它效率低下(缓慢)并且很难自动执行其中的任务。
a) 我可以通过 SSH 或使用命令行界面的任何加密连接来连接到 Windows 服务器吗?
b) 如果可以,我可以执行任何管理任务吗?
示例:
- 在 IIS 中创建新的虚拟文件夹
- 设置防火墙端口
- 重新启动服务
- 更改用户策略
- 启动桌面应用程序
我知道 Windows PowerShell 2.0 远程处理的存在,但我不知道它是否满足上述所有条件
到目前为止我的结论:来自 Windows PowerShell 可以执行大部分但不是全部管理任务。 而且我仍然不知道 Windows PowerShell 2.0 Remoting 是否使用加密连接。
When I was a Linux admin I could do anything from the SSH command line. Now, as a Windows admin, I have to deal with the Windows Remote Desktop graphical interface, which I found to be inefective (slow) and hard to automate tasks in it.
a) Can I connect to a Windows Server through SSH or any encrypted connection with command line interface?
b) If yes can I do ANY administrative task?
Examples:
- create a new virtual folder in IIS
- setup firewall ports
- restart services
- change user policies
- start desktop applications
I know about the existence of Windows PowerShell 2.0 Remoting, but I don't know if it fullfills all conditions above
My conclusion so far: from Windows PowerShell can do MOST but not ALL administrative tasks. And I still don't know if Windows PowerShell 2.0 Remoting uses an encrypted connection.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
PowerShell 正是您所寻找的。 它主要针对系统管理(尽管它作为程序员的 shell 也很出色)。
PowerShell v2 远程处理基于Windows 远程管理。 请参阅 http://msdn.microsoft.com/en-us /library/aa384426(VS.85).aspx。 正如您所期望的,它包括加密和身份验证设施。
PowerShell 包含可让您执行许多日常任务的 cmdlet。 Microsoft 服务器应用程序(IIS、Exchange 等)已经或正在构建 PowerShell cmdlet 来管理它们。 PowerShell 的 WMI 支持非常出色,为您提供了大量的计算机管理能力。 PowerShell 可以直接与 .NET 对话,这使您可以在需要时比内置设施更进一步。 编写 C# 供 PowerShell 调用也很干净。
您要求使用命令行界面,但不要认为您仅限于古老而粗糙的 Windows 控制台子系统。 PowerShell v2 包括一个新的 GUI 交互式 shell/脚本编辑器,具有着色和调试功能。 好可爱。
PowerShell is what you're looking for. It is primarily targetted at system administration (although it's fanastic as a programmer's shell, too).
PowerShell v2 remoting is based on Windows Remote Management. See http://msdn.microsoft.com/en-us/library/aa384426(VS.85).aspx. It includes facilities for ecryption and authentication, as you'd expect.
PowerShell includes cmdlets that let you do a lot of everyday tasks. Microsoft server applications (IIS, Exchange, etc.) either have or are building PowerShell cmdlets to administer them. PowerShell's WMI support is excellent, giving you a lot of machine administration power. PowerShell can talk to .NET directly, which lets you go further than built-in facilities when needed. And writing C# for PowerShell to call works out cleanly, too.
You asked for a command line interface, but don't think that you're restricted to the ancient and crufty Windows Console subsystem. PowerShell v2 includes a new GUI interactive shell / script editor, with colorization and debugging. It's sweet.
您也可以尝试 http://sshwindows.sourceforge.net/
我没有个人经验但看起来很有希望。
You can also try http://sshwindows.sourceforge.net/
I don't have personal experience with it but it looks promising.
你考虑过谷歌吗? (看起来您编辑了您的问题。您现在不再询问示例任务是否可以使用 PowerShell 来实现)
IIS 7 的 Powershell 管理单元
重新启动服务
组策略 >
等等...
Did you consider Google? (looks like you edited your question. You now no longer ask if the example tasks can be achieved using PowerShell)
Powershell snap-in for IIS 7
Restart-Service
Group policies
etc...
很抱歉没有回答您的问题。 我也遇到过类似的情况。
我放弃了在 Windows shell 上执行所有任务,
相反,我确实使用 shell 来执行某些任务,但我也使用 rdesktop(通过 ssh),并将最重要的 gui 管理工具的图标放在 Windows 快速启动上。
我放弃了让 Windows 感觉像 Unix,因为它永远不会。
Sorry for not answering your question. I was in a similar situation.
I gave up to do all tasks on the windows shell
Instead I do use the shell for some tasks, but I am also using rdesktop (through ssh) and I put icons for the most important gui admin tools on the windows quicklaunch.
I gave up making windows feel like unix because it never will.
或者尝试下载并安装 eurysco 以使用基于另一个逻辑的以下功能...
1.在 IIS 中创建一个新的虚拟文件夹(从 eurysco 命令行启动 vbs 或 powershell 脚本)
2.设置防火墙端口(从eurysco命令行启动netsh.exe advfirewall)
3.重启服务(来自eurysco服务控制)
4.更改用户策略(从eurysco系统注册表或命令行启动powershell脚本)
5.启动桌面应用程序(从eurysco命令行启动powershell脚本)
http://www.eurysco.com/features
alternatively try to download and install eurysco to use the following features that is based on another logic...
1.create a new virtual folder in IIS (from eurysco commandline to launch vbs or powershell script)
2.setup firewall ports (from eurysco commandline to launch netsh.exe advfirewall)
3.restart services (from eurysco service control)
4.change user policies (from eurysco system registry or commandline to launch powershell script)
5.start desktop applications (from eurysco commandline to launch powershell script)
http://www.eurysco.com/features