wmi远程连接与错误访问被拒绝 [英] wmi remote connection with errors access is denied
问题描述
我使用wmi远程连接电脑,代码如下:
i use wmi to remote connect a computer, code as below:
ConnectionOptions option = new ConnectionOptions ();
ConnectionOptions option = new ConnectionOptions();
option.Username = myusername;
option.Username = myusername;
option.Password = mypassword;
option.Password = mypassword;
然后是问题是,如果我使用域名\ xxx作为用户名,则连接良好。
then the quesion is, if i use the domain\xxx for Username, the connection is good.
但如果我使用本地管理员(远程机器的本地管理员)作为用户名,则发生错误:访问被拒绝。
but if i use the local administrator(the remote machine's local administrator) for the username, then the error occurs: access is denied.
有人可以告诉我为什么吗?
can somebody tell me why?
我还尝试过其他一些机器,其中一些适用于用户名,有些不是。
and i also tried on some other machines, some of them is good for both username, some not.
推荐答案
我使用wmi远程连接计算机,代码如下:
i use wmi to remote connect a computer, code as below:
ConnectionOptions option = new ConnectionOptions();
ConnectionOptions option = new ConnectionOptions();
option.Username = myusername;
option.Username = myusername;
option.Password = mypassword;
option.Password = mypassword;
然后问题是,如果我使用域名\xxx对于用户名,连接是好的。
then the quesion is, if i use the domain\xxx for Username, the connection is good.
但如果我使用本地管理员(远程机器的本地管理员)作为用户名,则会发生错误:访问被拒绝。
but if i use the local administrator(the remote machine's local administrator) for the username, then the error occurs: access is denied.
有人可以告诉我为什么吗?
can somebody tell me why?
我还试过其他一些机器,其中一些对两个用户都有好处,有些则不行。
and i also tried on some other machines, some of them is good for both username, some not.
您对这些计算机没有管理员权限
You have no administrator rights on those computers
这篇关于wmi远程连接与错误访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!