This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://api.cacher.io/raw/0fcd76d0761e565a8c4e/2ef1c75cc5abb4fa2880/start-cleanup')) | |
| Function Start-Cleanup { | |
| <# | |
| .SYNOPSIS | |
| Automate cleaning up a C:\ drive with low disk space | |
| .DESCRIPTION | |
| Cleans the C: drive's Window Temperary files, Windows SoftwareDistribution folder, | |
| the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import re | |
| import urllib.request | |
| import js2py | |
| import requests | |
| from lxml import etree | |
| from clint.textui import progress | |
| import fire | |
| from loguru import logger | |
| import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :global dynv6Token "dynv6Token" | |
| :global dynv6Zone "dynv6Zone" | |
| :local result [/tool fetch check-certificate=yes url="https://ipv4.dynv6.com/api/update\?ipv4=auto&token=$dynv6Token&zone=$dynv6Zone" as-value output=user]; | |
| :if ($result->"status" = "finished") do={ | |
| :log info "Dynv6Zone: $dynv6Zone Result: $($result->"data")" | |
| } | |
| :local result [/tool fetch check-certificate=yes url="https://ipv6.dynv6.com/api/update\?ipv6=auto&token=$dynv6Token&zone=$dynv6Zone" as-value output=user]; | |
| :if ($result->"status" = "finished") do={ | |
| :log info "Dynv6Zone: $dynv6Zone Result: $($result->"data")" |