远程重命名计算机c# [英] Rename a computer remotely c#

查看:88
本文介绍了远程重命名计算机c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个应用程序,我被困在应用程序的一部分或功能上。

我正在尝试构建一个以域管理员身份运行的C#windows应用程序(该软件应该请求域管理员凭据)并重命名域上的远程计算机(可以从文本框中读取计算机名称)。我想计算机应该在重命名后自动重启。请问有人会点灯吗?

谢谢

Hi, I am building an application and I am stuck at a part or function of the application.
I am trying to build a C# windows application that would run as domain admin (the software should ask for domain admin credentials) and Renames a Remote computer on the domain (The computer name can be read from a textbox). I guess the computer should restart automatically after it gets renamed. Can anyone shed some lights please?
Thanks

推荐答案

这就是你用 netdom 做的事情:< a href =http://www.terminally-incoherent.com/blog/2009/09/17/remotely-rename-a-computer-in-a-windows-domain/> http://www.terminally- incoherent.com/blog/2009/09/17/remotely-rename-a-computer-in-a-windows-domain/ [ ^ ]。



要以编程方式进行,您可以使用WMI:

http://stackoverflow.com/questions/6207411/remotely-change-computer-name-for-a-windows-server-2008- machine-using-c [ ^ ]。



-SA
This is how you do it with netdom: http://www.terminally-incoherent.com/blog/2009/09/17/remotely-rename-a-computer-in-a-windows-domain/[^].

To do it programmatically, you can ise WMI:
http://stackoverflow.com/questions/6207411/remotely-change-computer-name-for-a-windows-server-2008-machine-using-c[^].

—SA


这篇关于远程重命名计算机c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆