Solved

Powershell scripts to log lock and unlock computer for the user

Posted on 2016-08-22
4
181 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 79

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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

832 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