用于获取用户信息的 Windows 批处理命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12777081/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows batch commands to get user info
提问by Ivaylo Strandjev
I want to retrieve user information using batch. What I need is information for the groups the user belongs to and for the security settings for this user. I was not able to find any commands that would help me to achieve that. Any help will be appreciated.
我想使用批处理来检索用户信息。我需要的是用户所属组的信息以及该用户的安全设置。我找不到任何可以帮助我实现这一目标的命令。任何帮助将不胜感激。
回答by gammay
You can parse outputs from net user /domain <user>or gpresult /rcommands.
您可以解析来自net user /domain <user>或gpresult /r命令的输出。

