https://github.com/lifailon/ps-pi-hole
Module for integrating Pi-Hole into PowerShell
https://github.com/lifailon/ps-pi-hole
api pi-hole powershell powershell-module rest-api windows
Last synced: 5 months ago
JSON representation
Module for integrating Pi-Hole into PowerShell
- Host: GitHub
- URL: https://github.com/lifailon/ps-pi-hole
- Owner: Lifailon
- Created: 2023-05-02T15:14:03.000Z (about 3 years ago)
- Default Branch: rsa
- Last Pushed: 2023-05-03T11:35:00.000Z (about 3 years ago)
- Last Synced: 2025-04-05T15:51:38.694Z (about 1 year ago)
- Topics: api, pi-hole, powershell, powershell-module, rest-api, windows
- Language: PowerShell
- Homepage: https://www.nuget.org/packages/PS-Pi-Hole
- Size: 2.65 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PS-Pi-Hole
Module for interacting with pi-hole using the REST API. **Used all possible endpoints** at the time of release module.
## 🚀 Install
Download and run the script **[Deploy-Invoke-Pi-Hole.ps1](https://github.com/Lifailon/PS-Pi-Hole/blob/rsa/Deploy-Invoke-Pi-Hole.ps1)**
## 🔐 Token
Get Token (ssh): `sudo cat /etc/pihole/setupVars.conf | grep WEBPASSWORD` \
Server and Token can be set in module parameters (**line 28 and 29**)
## 🔑 Keys
- ✅ `Invoke-Pi-Hole -Server 192.168.1.253 -Token 5af9bd44aebce0af6206fc8ad4c3750b6bf2dd38fa59bba84ea9570e16a05d0f -Status`
- ✅ `Invoke-Pi-Hole -Enable` Enable Blocking
- ✅ `Invoke-Pi-Hole -Disable` Disable Blocking
- ✅ `Invoke-Pi-Hole -Stats` Blocking work status
- ✅ `Invoke-Pi-Hole -TopClient`
- ✅ `Invoke-Pi-Hole -TopPermittedDomains`
- ✅ `Invoke-Pi-Hole -TopPermittedDomains -Count 100`
- ✅ `Invoke-Pi-Hole -LastBlockedDomain`
- ✅ `Invoke-Pi-Hole -ForwardServer` Upstream servers
- ✅ `Invoke-Pi-Hole -QueryTypes`
- ✅ `Invoke-Pi-Hole -QueryLog`
- ✅ `Invoke-Pi-Hole -Data` Number of requests for every 10 minutes during the last 24 hours
- ✅ `Invoke-Pi-Hole -Versions` Current and Latest versions
- ✅ `Invoke-Pi-Hole -Releases` Current (last) version and date from the GitHub repository
- ✅ `Invoke-Pi-Hole -AdList` Status Hosts List (StevenBlack)
## 🎉 Examples
- **Connect to Pi-Hole server** for get stats (it is not necessary to use a token)


- **Enable/Disable Blocking** (using filters) and get status

- **Get full Query Log** (comparison of raw and parsing output)

- **Top** local clients and permitted (available) domains destination

- **View versions** for monitoring and update
