# How to disable pi-hole for 5 minutes using Curl or Powershell

**URL:** <https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235>\
**Category:** Community Help\
**Created:** [October 6, 2024, 1:49pm UTC](https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235 "2024-10-06T13:49:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![willi.neu9](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/w/f04885/32.png) [@willi.neu9](https://discourse.pi-hole.net/u/willi.neu9)\
**Post date:** [October 6, 2024, 1:49pm UTC](https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235/1 "2024-10-06T13:49:28Z")

</div>

Ho can I disable pihole for 5 minutes using a curl or Powershell Command.  
What I've tried is:  
curl -X GET "[http://cs1:60080/admin/api.php?disable=360](http://cs1:60080/admin/api.php?disable=360)"  
But I get pi-hole answer:  
Session expired! Please re-login on the Pi-hole dashboard

Any idea

/Willi/

---

<div class="post-metadata">

**Author:** ![stonerl](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/stonerl/32/39097_2.png) [@stonerl](https://discourse.pi-hole.net/u/stonerl)\
**Post date:** [October 6, 2024, 2:50pm UTC](https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235/2 "2024-10-06T14:50:56Z")

</div>

You might need to add the API token to access this endpoint:

> [@How to use the api](https://discourse.pi-hole.net/t/how-to-use-the-api/61004/2):
>
> To use most API endpoints you need to append &auth=\<YOURAPITOKEN\> to the URL, like this: http://pi.hole/admin/api.php?summaryRaw&auth=\<YOURAPITOKEN\>

---

<div class="post-metadata">

**Author:** ![willi.neu9](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/w/f04885/32.png) [@willi.neu9](https://discourse.pi-hole.net/u/willi.neu9)\
**Post date:** [October 6, 2024, 4:06pm UTC](https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235/3 "2024-10-06T16:06:51Z")

</div>

stonerl thank you very much for your hint. Because I have no Admin passwort I removed "&auth=" completely. But adding just "&auth=" make it run!

/Willi/

---

<div class="post-metadata">

**Author:** ![lookmomnohands](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/lookmomnohands/32/43657_2.png) [@lookmomnohands](https://discourse.pi-hole.net/u/lookmomnohands)\
**Post date:** [October 10, 2024, 4:49am UTC](https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235/4 "2024-10-10T04:49:57Z")

</div>

Any chance there's a way to target just one device, rather than disable all blocking, for X seconds? Suggestion being add to a group then disable the group (or enable exclusionGroup, I'm easy), that group after X sleep? I guess what I'm asking is, does the API support such a request? If so where would one source the applicable syntax?

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [October 31, 2024, 4:50am UTC](https://discourse.pi-hole.net/t/how-to-disable-pi-hole-for-5-minutes-using-curl-or-powershell/73235/5 "2024-10-31T04:50:48Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
