我正在尝试对 AD 进行 PowerShell 搜索,以仅查找在过去 30 天内登录的计算机(而不是服务器或其他计算机)。除了 30 天的限制之外,我已经编写了大部分脚本。任何帮助将不胜感激。
Get-ADComputer -Filter * -Properties * | FT 名称、操作系统、LastLogonDate -Autosize | 外文件 C:\Temp\ComputerLastLogonDate.csv
powershell active-directory domain-controller
active-directory ×1
domain-controller ×1
powershell ×1