[英]Add user to local group on remote computer using different credentials
I have credentials for the local "Administrator" user on every computer in my department. 我在我部门的每台计算机上都有本地“管理员”用户的凭据。 Sometimes, when I set the machines up for my colleagues, I forget to add my domain username in the administrators group (whoopsie!).
有时,当我为同事设置机器时,我忘记将我的域用户名添加到管理员组中(哇!)。 It would be easy just setting up a remote desktop connection passing the Administrator user credential, but I'd like to do this "silently", so my question is: is there a way to pass those credentials by shell and then perform the usual operations for adding a user (mine, in this case) to the administrators group?
设置通过管理员用户凭据的远程桌面连接很容易,但是我想“静默地”执行此操作,所以我的问题是:是否有一种方法可以通过外壳传递那些凭据,然后执行常规操作将用户(在这种情况下为我的用户)添加到管理员组的方法?
I work with Windows machines in an Active Directory environment. 我在Active Directory环境中使用Windows计算机。
Thanks. 谢谢。
Well, this is not from the shell, but you could from your PC/Server as admin run computer management, right click "Computer Management (local)" select "connect to another computer" and bring up the remote computers computer management console and add yourself to that computers local admin group in the background. 好吧,这不是从外壳程序来的,但是您可以从PC /服务器以管理员身份运行计算机管理,右键单击“计算机管理(本地)”,选择“连接到另一台计算机”,然后调出远程计算机的计算机管理控制台并添加您可以在后台访问该计算机的本地管理员组。 Hope that helps.
希望能有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.