Solved

Powershell scripts to log lock and unlock computer for the user

Posted on 2016-08-22
4
99 Views
Last Modified: 2016-08-29
Hi All,

I just want a powershell scripts to log lock and unlock computer for the user.
This script is going to be deployed through AppSense.
0
Comment
Question by:Techie solution
  • 2
4 Comments
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 250 total points
ID: 41766100
you have to monitor the security event log on the machine for the id:4800 Lock and ID:4801 Unlock
Computer Configuration / Windows Settings / Security Settings / Advanced Audit Policy Configuration / System Audit Policies - Local Group Policy Object / Logon/Logoff / Audit Other Logon/Logoff Events
0
 
LVL 8

Accepted Solution

by:
James Rankin earned 250 total points
ID: 41766115
If you're using AppSense no need for a script. Appsense has Locked and Unlocked triggers. Just add actions on these triggers to do whatever you want - you could easily use the Update Text File action to write to a log.
0
 
LVL 8

Expert Comment

by:James Rankin
ID: 41766116
If you're using AppSense no need for a script. Appsense has Locked and Unlocked triggers. Just add actions on these triggers to do whatever you want - you could easily use the Update Text File action to write to a log.
0
 

Author Closing Comment

by:Techie solution
ID: 41775481
Thank you both
0

Join & Write a Comment

Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
A procedure for exporting installed hotfix details of remote computers using powershell
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now