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: