Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Powershell scripts to log lock and unlock computer for the user

Posted on 2016-08-22
4
Medium Priority
?
375 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 83

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 1000 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 1000 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

Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

Question has a verified solution.

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

Let's recap what we learned from yesterday's Skyport Systems webinar.
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

721 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