Home > OS >  Exchange system of export check-in time/generate specified format as the attendance system
Exchange system of export check-in time/generate specified format as the attendance system

Time:09-24

According to the actual demand can be mail system users to export the specified format, then statistics of sign in to work every day time,

The following for own use code ps1:
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
Start - Process - C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ powershell exe -
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
. 'D: \ ex1 \ bin \ RemoteExchange ps1'; Connect - ExchangeServer - auto - ClientApplication: ManagementShell
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
The get - mailboxstatistics - server ex1 | select - object displayname, lastlogontime | sort lastlogontime - unique - item first-just | export to CSV d: \ share \ kaoqin CSV - encoding "unicode"
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
$excel=new - object - ComObject excel. Application
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
$excel. Visible=$true
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
. $excel workbooks. Open (" D: \ Share \ kaoqin CSV "). The saveas (" D: \ Share \ kaoqin XLS ", 51)
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility
$excel. The quit ()
# # # # # # # # # # # # # # # # # # # # # # I agree not to allow forward and reproduced, otherwise if there will be investigated for legal responsibility


  • Related