{"id":14063610,"url":"https://github.com/zweilosec/PowerShell-Administration-Tools","last_synced_at":"2025-07-29T15:34:32.140Z","repository":{"id":57831049,"uuid":"245420277","full_name":"zweilosec/PowerShell-Administration-Tools","owner":"zweilosec","description":"Powershell scripts for automating common system administration, blue team, and digital forensics tasks","archived":false,"fork":false,"pushed_at":"2022-12-28T19:57:20.000Z","size":125,"stargazers_count":54,"open_issues_count":1,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-13T07:05:20.797Z","etag":null,"topics":["automation","forensics","forensics-investigations","offensive-security","powershell","powershell-adminscripts","powershell-scripts","red-team","redteam","system-administration"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zweilosec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-06T12:58:14.000Z","updated_at":"2024-07-12T09:33:57.000Z","dependencies_parsed_at":"2023-01-31T07:15:54.539Z","dependency_job_id":null,"html_url":"https://github.com/zweilosec/PowerShell-Administration-Tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweilosec%2FPowerShell-Administration-Tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweilosec%2FPowerShell-Administration-Tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweilosec%2FPowerShell-Administration-Tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweilosec%2FPowerShell-Administration-Tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zweilosec","download_url":"https://codeload.github.com/zweilosec/PowerShell-Administration-Tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228028524,"owners_count":17858343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","forensics","forensics-investigations","offensive-security","powershell","powershell-adminscripts","powershell-scripts","red-team","redteam","system-administration"],"created_at":"2024-08-13T07:03:25.206Z","updated_at":"2024-12-04T01:31:04.219Z","avatar_url":"https://github.com/zweilosec.png","language":"PowerShell","readme":"---\ndescription: \u003e-\n  A collection of Windows PowerShell tools for making system administration and\n  troubleshooting easier.\n---\n\n# PowerShell Administration Tools\n\nPowerShell scripts for automating common system administration/ digital forensics tasks.  Suggestions, submissions, updates, and requests are always welcome!\n\n| Script Name | Description |\n| :--- | :--- |\n| [Clear-ExcessCertificates](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Clear-ExcessCertificates.ps1) | Clears all PIV certificates from the local store except for the current user's |\n| [Create-ADUserFromCsv](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Create-ADUserFromCsv.ps1) | Batch creates users in Active Directory from a .csv file. |\n| [Get-Computer\\_Inventory](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Get-ComputerInventoryToCSV.ps1) | 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. |\n| [Get-Monitor\\_Inventory](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Get-Monitor_Inventory.ps1) | 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 |\n| [Locate-UserProfile](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Locate-UserProfile.ps1) | 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. |\n| [Add-RemotePrinter](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Add-RemotePrinter.ps1) | 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. |\n| [Get-SoftwareInventory](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Get-SoftwareInventory.ps1) | Outputs a list of software installed on the target computer from the registry. Lists ComputerName, Software DisplayName, Version, and Publisher. |\n| [New-Shortcut](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/New-Shortcut.ps1) | Creates a new shortcut (.lnk) file with the specified properties. |\n| [Get-ShortcutProperties](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Get-ShortcutProperties.ps1) | Get the properties of the specified shortcut (.lnk) file |\n| [Create-IsoWithLnk](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Create-IsoWithLnk.ps1) | 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! |\n\n## Network Tools\n| Script Name | Description |\n| :--- | :--- |\n| [Get-OpenPortsWithProcess](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Network/Get-OpenPortsWithProcess.ps1) | A simple script for listing open TCP or UDP ports. \u003cbr\u003eHas three options: \u003cbr\u003e* `-TCP` : show TCP ports\u003cbr\u003e* `-UDP` : show UDP ports\u003cbr\u003e* `-Listening` :  Show only listening ports |\n| [Renew-DHCP](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Network/Renew-DHCP.ps1) | Releases DHCP reservations for all active interfaces and renews them. Fully PowerShell equivilent to running `ipconfig /release; ipconfig /renew`. |\n|[Scan-TCPPorts](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Network/Scan-TCPPorts.ps1) | 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. |\n\n## Snippets\nDrop these snippets into your scripts to add this functionality. May need to modify variables to fit your use cases.\n\n| Script Name | Description |\n| :--- | :--- |\n| [Run-ADPreChecks](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Snippets/Run-ADPreChecks.ps1) |Code snippet to do some preliminary checks to ensure a script will function\u003cbr\u003eChecks for: administrator privileges, PowerShell v5 or greater, and the ActiveDirectory PowerShell modules |\n| [Select-FileWithDialog](https://github.com/zweilosec/PowerShell-Administration-Tools/blob/master/Snippets/Select-FileWithDialog.ps1) | Code snippet to display an Explorer window to select a file (.csv and .txt in this example) |\n\n#### More content from Zweilosec:\n\n## [OSCP prep and CTF notes](https://zweilosec.gitbook.io/hackers-rest/)\n\n  \nIf you like this content and would like to see more, please consider [buying me a coffee](https://www.buymeacoffee.com/zweilosec)!\n","funding_links":["https://www.buymeacoffee.com/zweilosec)!"],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweilosec%2FPowerShell-Administration-Tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzweilosec%2FPowerShell-Administration-Tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweilosec%2FPowerShell-Administration-Tools/lists"}