简体   繁体   English

使用不同的凭据将用户添加到远程计算机上的本地组

[英]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.

相关问题 Windows Server AD 2022 - 使用 PowerShell 通过 GPO 将域用户添加到本地组“远程桌面用户” - Windows Server AD 2022 - Add a domain user to the local group "Remote Desktop Users" via GPO using PowerShell 向远程计算机中的共享文件夹添加用户访问权限 - Add user access to a shared folder in remote computer 使用Net.exe,如何添加具有“描述”字段的用户组,如Windows计算机管理中所示? - Using Net.exe, how do you add a user group with a 'Description' field as shown in Windows Computer Management? 使用 powershell 添加本地组用户策略 - Add Local Group User policies with powershell up将用户添加到本地Windows组 - puppet add user to local windows group 如何使用不同的凭据连接到映射/本地磁盘? - How to connect to mapped/local disk using different credentials? 仅使用本地管理员用户(使用powershell或/和c#)控制远程计算机上的服务 - Control a service on a remote computer with only a local admin user (with powershell or/and c#) 使用chef创建Windows用户并将用户添加到本地Administrators组 - Create windows user with chef and add user to the local Administrators group 远程计算机无法访问本地 Windows 服务 - Local windows service not accessible to the remote computer 使用Powershell向本地用户添加本地组时出错 - Error while adding a local group to local user using powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM