Have any questions

Log Off Windows Users that are Logged In

Let’s assume one of your users has wrapped up work for the day but has not logged out from his system. The need for maintenance arises but there are quite a few users in the network that are logged in. In a scenario like this, to centrally log off these users, you can run this script

Syntax

PS> quser
USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
>administrator         console             1  Active      none   9/22/2018 11:04 AM

Download Full Script

Purpose:This script will help you in signing out users that had signed in earlier but have not been accessing the system since X number of days/time period. Signing out or logging off these users from the system would help in carrying out your tasks without any bottlenecks. 
Modification:User deletion timestamp and switch can be modified as per need
Type:PowerShell Script (ps1) 
Compatibility:Windows 
Tags:-
Reference link: