Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在部署时为我的应用程序创建一个用户。我想阻止其他人使用该用户登录。如何使用 c# 禁用此用户的交互式登录?
换句话说,如何SeDenyInteractiveLogonRight为那个用户设置?
SeDenyInteractiveLogonRight
您正在寻找的功能是LsaAddAccountRights.
LsaAddAccountRights
如果您的帐户属于 Windows 域: