2017年7月24日 星期一

powershell check inactive user

last logon server user account  over 400 days

Search-ADAccount -UsersOnly -AccountInactive -TimeSpan 400 | ?{$_.enabled -eq $True} | Get-ADUser -Properties Name, sAMAccountName, givenName, sn | Select Name, sAMAccountName, givenName, sn


---------------------------------------------------------------------------------------------------------
Fine tune script over 400 days

Search-ADAccount -UsersOnly -AccountInactive -TimeSpan 400 | Get-ADUser -Properties Name, sAMAccountName, givenName, sn | Select Name, sAMAccountName, givenName, sn > c:\report\test1.txt


Search-ADAccount -UsersOnly -AccountInactive -TimeSpan 400 | Get-ADUser -Properties Name, sAMAccountName, givenName, sn | Select Name, sAMAccountName, givenName, sn | export-csv c:\report\test1.csv



-------------------------------------------------------------------------------------------------------

since day

Search-ADAccount -AccountInactive -DateTime 10/15/2015 | where {$_.ObjectClass -eq 'user'} | FT Name,ObjectClass –A > c:\temp\xxx.txt

-----------------------------------------------------------------------------------------------------
Base OU finding incative account

Search-ADAccount -UsersOnly -SearchBase "OU=Students,OU=SCS Users,DC=scs,DC=local" -AccountInactive -TimeSpan 400 | Get-ADUser -Properties Name, sAMAccountName, givenName, sn | Select Name, sAMAccountName, givenName, sn > c:\temp\test1.txt


"OU=Students,OU=SCS Users,DC=scs,DC=local"

Data center server 過熱對答

Dear Operator,

Recently our IBM SAN Storage DS4700 (installed at the bottom of Colo-2, CDC1 at PiChiu) has generated a lot of Critical Alerts, stating the device has exceeded its nominal temperature.
We have already tried our best to clear all unused objects around the device, and we checked the cooling system of the device is working properly, but the overheat situation still occur. Would you please help to take a look at this issue, and improve the cooling performance of Colo-2 accordingly?

Thank you very much.

Best regards,



------------------------------------------------------------------------------------------------------------------------------------------
We checked the temperature at the back side of COLO-2 was 31°C at 1000, July 24, 2017.  It is caused by compressor failure of one of the air conditioners in CDC1.  The anticipated recovered time of the captioned event is July 28, 2017 due to waiting for parts delivery.

At 1030, July 24, 2017, the on-duty computer operators had set up the cooling fan at the back side of COLO-2 and the temperature was dropped to 26°C at 1300, July 24, 2017.  We will monitor the temperature closely.


Please have a check of your servers in COLO-2.