Solved

Powershell scripts to log lock and unlock computer for the user

Posted on 2016-08-22
4
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 81

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 9

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 9

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

752 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