Windows Server 2008 R2function级别 – 不活动的计算机对象

我正在计划一个域名迁移,我想知道哪些计算机对象已经启动并正在运行。 已经尝试命令“dsquery计算机domainroot -stalepwd”,但我仍然有一些怀疑与输出。 有没有人有任何其他build议?

提前致谢!

JFA

假设PowerShell脚本是可以接受的,这里有一个马特Vogt的礼貌。

https://gallery.technet.microsoft.com/scriptcenter/Get-Inactive-Computer-in-54feafde

# Gets time stamps for all computers in the domain that have NOT logged in since after specified date # Mod by Tilo 2013-08-27 import-module activedirectory $domain = "domain.mydom.com" $DaysInactive = 90 $time = (Get-Date).Adddays(-($DaysInactive)) # Get all AD computers with lastLogonTimestamp less than our time Get-ADComputer -Filter {LastLogonTimeStamp -lt $time} -Properties LastLogonTimeStamp | # Output hostname and lastLogonTimestamp into CSV select-object Name,@{Name="Stamp"; Expression={[DateTime]::FromFileTime($_.lastLogonTimestamp)}} | export-csv OLD_Computer.csv -notypeinformation 

将$域值更改为您的域名,将$ DaysInactive更改为您希望的任意长度。