Initial Commit
This commit is contained in:
commit
5c7cfda48e
8 changed files with 119 additions and 0 deletions
10
adaccount-expiry/ADAccount-Expiry.ps1
Executable file
10
adaccount-expiry/ADAccount-Expiry.ps1
Executable file
|
@ -0,0 +1,10 @@
|
|||
# AD Account Expiration Script
|
||||
#
|
||||
# Please see the README.
|
||||
# -Tack
|
||||
|
||||
$expired = Search-ADAccount -AccountExpired | Select Name, SamAccountName, Manager, Enabled, AccountExpirationDate
|
||||
$expiring = Search-ADAccount -AccountExpiring -TimeSpan "14" | Select Name, SamAccountName, Manager, Enabled, AccountExpirationDate
|
||||
$disabled = Search-ADAccount -AccountDisabled | Select Name, SamAccountName, Manager, Enabled, AccountExpirationDate
|
||||
|
||||
&{$expired; $expiring; $disabled} | Export-Csv .\ad_account_expiration_report.csv -NoTypeInformation
|
29
adaccount-expiry/README.md
Executable file
29
adaccount-expiry/README.md
Executable file
|
@ -0,0 +1,29 @@
|
|||
# ADAccount Expiry PS Script v22.01.1
|
||||
|
||||
ADAccount Expiry is a PowerShell script that allows AD Admins to export into the Script's Current Directory a CSV report on Active Directory Accounts that are Expired, Expiring within 2 weeks, and/or Disabled..
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Before you begin, ensure you have met the following requirements:
|
||||
* PowerShell with the [ActiveDirectory](https://docs.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps) module installed (Windows only).
|
||||
* Proper permissions granted by your Admin.
|
||||
|
||||
## Installing ADAccount Expiry
|
||||
|
||||
To install ADAccount Expiry, follow these steps:
|
||||
|
||||
* Download the release Source code and place the contents into folder at a location of your choosing.
|
||||
|
||||
## Using ADAccount Expiry
|
||||
|
||||
To use ADAccount Expiry, follow these steps:
|
||||
|
||||
```
|
||||
- Run the script in PowerShell
|
||||
- The report will be exported to the current directory
|
||||
- Open the CSV in Excel
|
||||
- File > Save As . change extension dropdown to "*.xlsx" > Save
|
||||
- You may now apply any formatting/editing to the report prior to submitting it
|
||||
```
|
||||
|
||||
This project uses the following license: [Unlicense](https://unlicense.org).
|
4
adaccount-expiry/ROADMAP.md
Executable file
4
adaccount-expiry/ROADMAP.md
Executable file
|
@ -0,0 +1,4 @@
|
|||
# Roadmap
|
||||
|
||||
* Add ability to email results upon completion of script
|
||||
* Add ability to automate running of script on schedule
|
Loading…
Add table
Add a link
Reference in a new issue