Initial Commit

main
capntack 1 year ago
commit 5c7cfda48e

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>

@ -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

@ -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).

@ -0,0 +1,4 @@
# Roadmap
* Add ability to email results upon completion of script
* Add ability to automate running of script on schedule

@ -0,0 +1,20 @@
$servers = @("HOSTNAME")
Foreach ($server in $servers)
{
$disks = Get-WmiObject Win32_LogicalDisk -ComputerName $server -Filter DriveType=3 |
Select-Object DeviceID,
@{'Name'='Size'; 'Expression'={[math]::truncate($_.size / 1GB)}},
@{'Name'='Freespace'; 'Expression'={[math]::truncate($_.freespace / 1GB)}}
$server
foreach ($disk in $disks)
{
$disk.DeviceID + $disk.FreeSpace.ToString("N0") + "GB / " + $disk.Size.ToString("N0") + "GB"
}
}
# /Update on Dec 9, 2019/
# Note that moving forward, future PowerShell versions no longer support Get-WmiObject so if all of a sudden you see the error message like “RPC Server is unavailable”, its probably time to switch over to Get-CimInstance instead. The parameters are the same for Win32_LogicalDisk. Simply replace Get-WmiObject with Get-CimInstance and you are good to go.

@ -0,0 +1,29 @@
# Check Free Space PS Script v22.01.1
Check Free Space is a PowerShell script that allows AD Admins to check the used/max HDD space on all drives on a remote PC on the domain.
## 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 Check Free Space
To install Check Free Space, follow these steps:
* Download the release Source code and place the contents into folder at a location of your choosing.
## Using Check Free Space
To use Check Free Space, follow these steps:
```
- Open the script in a notepad program
- Enter the hostname of the target PC in the "HOSTNAME" field, replacing the word already there
- Save the file
- Run the script in PowerShell
- The results will be printed out in the terminal
```
This project uses the following license: [Unlicense](https://unlicense.org).

@ -0,0 +1,3 @@
# Roadmap
* N/A
Loading…
Cancel
Save