This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Get all home directories from /etc/passwd | |
| HOMEDIRS=$(awk -F: '$6 !~ /^$/ {print $6}' /etc/passwd | sort -u) | |
| # Loop through each home directory | |
| for dir in $HOMEDIRS; do | |
| MAILDIR="$dir/Maildir" | |
| # Check if the Maildir exists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Retrieves logon and logoff events from a local or remote computer. | |
| .DESCRIPTION | |
| This script queries the Windows Event Log for logon (7001) and logoff (7002) events. | |
| The results are sorted in descending order by date and displayed in a table. | |
| .PARAMETER Computer | |
| The target computer name (Default: Local computer). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Tracks system shutdown and reboot events. | |
| .DESCRIPTION | |
| This script retrieves event ID 1074 from the System log to identify shutdown and reboot events. | |
| It can generate reports for a single server or multiple servers. | |
| .PARAMETER Computer | |
| The target computer name (default: local computer). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Active Directory Domain Services (AD DS) Health and User Reports. | |
| .DESCRIPTION | |
| This script performs various AD DS health checks, DNS diagnostics, replication status checks, | |
| and extracts domain admin and password expiry reports. | |
| .PARAMETER LogPath | |
| Directory to store log and report files (default: C:\ADDS_Checks). |
OlderNewer