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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors