zweilosec / PowerShell-Administration-Tools

Powershell scripts for automating common system administration, blue team, and digital forensics tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

description
A collection of Windows PowerShell tools for making system administration and troubleshooting easier.

PowerShell Administration Tools

PowerShell scripts for automating common system administration/ digital forensics tasks. Suggestions, submissions, updates, and requests are always welcome!

Script Name Description
Clear-ExcessCertificates Clears all PIV certificates from the local store except for the current user's
Create-ADUserFromCsv Batch creates users in Active Directory from a .csv file.
Get-Computer_Inventory Searches a network for the computers specified (by computer name) and reports a list of inventory-related information for those computers. IP, MAC, Make, Model, Serial, and Last User. Requires WinRM to be running on the system Use the -DCOM argument to run without WinRM! Does not require admin rights.
Get-Monitor_Inventory Searches a domain for the computers specified (by computer name) and reports a list of inventory-related information for the attached Monitors. Make, Model, Serial
Locate-UserProfile Searches a domain for the user ID specified. Returns a list of all of the computers that user has signed into, their $home folder, and the last time they logged in. Saves output in a CSV file.
Add-RemotePrinter Adds a printer to the computer specified (by computer name). Requires some information such as printer IP, Driver long name, and the name you want the printer to be displayed as.
Get-SoftwareInventory Outputs a list of software installed on the target computer from the registry. Lists ComputerName, Software DisplayName, Version, and Publisher.
New-Shortcut Creates a new shortcut (.lnk) file with the specified properties.
Get-ShortcutProperties Get the properties of the specified shortcut (.lnk) file
Create-IsoWithLnk A fun attempt at creating an offensive tool. This one creates a .lnk file, and autostart.inf file that links to the .lnk, and an ISO that contains them both. In a vulnerable system this might be able to autorun something (non-malicious of course!) All of this wrapped up in a nice little GUI form!

Network Tools

Script Name Description
Get-OpenPortsWithProcess A simple script for listing open TCP or UDP ports.
Has three options:
* -TCP : show TCP ports
* -UDP : show UDP ports
* -Listening : Show only listening ports
Renew-DHCP Releases DHCP reservations for all active interfaces and renews them. Fully PowerShell equivilent to running ipconfig /release; ipconfig /renew.
Scan-TCPPorts A simple TCP port scanner. Takes in a comma separated list of IPs, and of ports. An output file (csv or txt) can be specified as well.

Snippets

Drop these snippets into your scripts to add this functionality. May need to modify variables to fit your use cases.

Script Name Description
Run-ADPreChecks Code snippet to do some preliminary checks to ensure a script will function
Checks for: administrator privileges, PowerShell v5 or greater, and the ActiveDirectory PowerShell modules
Select-FileWithDialog Code snippet to display an Explorer window to select a file (.csv and .txt in this example)

More content from Zweilosec:

If you like this content and would like to see more, please consider buying me a coffee!

About

Powershell scripts for automating common system administration, blue team, and digital forensics tasks


Languages

Language:PowerShell 99.0%Language:C# 1.0%