Skip to content

onurogut/windows_scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Windows Scripts Repository

This repository contains automated PowerShell scripts for Windows systems.

πŸ“Œ signoff_disconnected_users_with_exceptions.ps1 - Automatic Session Sign-off Script

This PowerShell script detects user sessions that have been disconnected for a specified timeout period and automatically logs them off. You can specify users to exclude from this process and log all operations for tracking purposes.


πŸ“‹ Features

βœ” Disconnected User Tracking: Identifies users who have been disconnected for the specified duration.
βœ” Excluded Users: Allows predefined users to be excluded from the process.
βœ” Automatic Session Termination: Automatically logs off users whose sessions exceed the timeout limit.
βœ” HTML Logging: Stores session termination logs in a detailed HTML file.


πŸ’» Installation & Usage

1️⃣ Clone the Repository:

git clone https://github.com/onurogut/windows_scripts.git
cd windows_scripts

2️⃣ Set PowerShell Execution Policy: (If needed)

Set-ExecutionPolicy Unrestricted -Scope Process

3️⃣ Run the Script: (Requires Admin Privilige to Sign-off users)

.\signoff_users.ps1

βš™οΈ Configuration

You can modify the following parameters within the script:

  • $sessionTimeoutMinutes β†’ The session timeout period (in minutes).
  • $excludedUsers β†’ List of users to be excluded from the process.
  • $logFolder β†’ Directory where the HTML log files will be stored.

πŸ“„ Log File

  • Logs are stored in the C:\signoff_logs directory in HTML format.
  • Daily log files are created as signoff_edilen_YYYY-MM-DD.html.
  • Logs are recorded in INFO, WARNING, ERROR, and DEBUG levels for detailed tracking.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors