询问者
域控后台:查询域账号登录PC和时间记录

问题
全部回复
-
Hi,
建议您尝试两个命令,分别为GET-ADUSER 和 GET-ADCOMPUTER,您可以使用它们及其中包含的参数获得您需要的信息。
https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-aduser?view=win10-ps
https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-adcomputer?view=win10-ps
如果您需要进一步支持,请联系我们。
祝好,
Young Yang
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
我是否可以理解为,您的需要是这样的:
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
我是否可以理解为,您的需要是这样的:
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.感谢回复,是我想要的,但是我的AD域控是 Windows Server 2016 ,
Get-UserLogon -Computer 主机名
报错提示:
Get-UserLogon : 无法将“Get-UserLogon”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
https://gallery.technet.microsoft.com/scriptcenter/Get-LoggedOnUser-Gathers-7cbe93ea
是否有支持window Server 2016的?
-
- 该脚本并未在server2016上进行验证,尚不清楚是否可以完整达到预期目标,我们会对此进行测试并按照您的要求寻求您期望的脚本。
- 链接内的命令并非Powershell自带的命令,为后期人为创作的自定义脚本模块,如果您没有将该模块保存,则无法在首次启动powershell的时候进行加载并完美运行。
- 请问您是否按照链接最下方的教程,将该脚本保存为可被加载的自定义模块,之后重启Powershell ISE,并加载该模块,观察是否可以成功运行。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.1、脚本保存到:C:\Program Files\WindowsPowerShell\Modules\Get-UserLogon\Get-UserLogon.psm1
脚本tab键执行没问题,可以换出来,但是执行没结果
2、操作系统是在window Server 2016 简体中文版,不知道是否和英文版操作系统有关系?
-
根据您的反馈,我在我的虚拟机上进行了测试,我的虚拟机为2016英文版,测试结果是可以显示出内容的。
那么建议您将操作系统调整为英文系统,并且再进一步尝试。
如果您需要进一步支持,请联系我们。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com. -
根据您的反馈,我在我的虚拟机上进行了测试,我的虚拟机为2016英文版,测试结果是可以显示出内容的。
那么建议您将操作系统调整为英文系统,并且再进一步尝试。
如果您需要进一步支持,请联系我们。
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.1、可以根据域账号,查询该域账号登录了哪些PC?
2、Get-UserLogon -Computer client01 =》查询登录“client01”这台计算机的用户是哪些?