上次计算机帐户密码通过Powershell更改

有谁知道如何通过PowerShell的一个域中的所有服务器上次计算机帐户密码更改?

http://www.rlmueller.net/PwdLastChanged.htm

http://blogs.metcorpconsulting.com/tech/?p=1369
从上面的链接:

Import-Module activedirectory [int]$ComputerPasswordAgeDays = 90 IF ((test-path "c:\temp") -eq $False) { md "c:\temp" } $ExportFile = "c:\temp\InactiveWorkstations.csv" $ComputerStaleDate = (Get-Date).AddDays(-$ComputerPasswordAgeDays) $InactiveWorkstations = Get-ADComputer -filter { (passwordLastSet -le $ComputerStaleDate) -and (OperatingSystem -notlike "*Server*") -and (OperatingSystem -like "*Windows*") } -properties Name, DistinguishedName, OperatingSystem,OperatingSystemServicePack, passwordLastSet,LastLogonDate,Description $InactiveWorkstations | export-csv $ExportFile