Disk Cleaner PowerShell Script
HTML-код
- Опубликовано: 11 сен 2024
- 1. Download zip file from here: github.com/jim... and extract.
2. Run PowerShell as Administrator
3. Run command Set-ExecutionPolicy Unrestricted
4. Run command cd C:\users\[[your_username]]\Downloads\diskcleaner
5. Run command .\DiskCleaner.ps1
6. Wait for it to load initially (it takes a minute to scan files)
7. Select Drive
8. Click Clean Disk Button
GitHub: github.com/jim...
Substack: jimtyler.subst...
Website: powershellengin...
Twitter: / jimrtyler
Facebook: / coachjimtyler
Instagram: / coachjimtyler
TikTok: / coachjimtyler
PowerShell is a registered trademark of Microsoft. I don't represent Microsoft, the PowerShell team at Microsoft, or any of my past or current employers. All views and opinions are mine and mine alone. Every effort has been made to ensure that this video contains current and accurate information regarding its subject matter. However, I am not liable for any loss or damage suffered by viewers due to any information contained herein.
why this intro has to be so loud and you have to be so quiet?
no information on the github about the project. (description/manual) Seems like an experimental thing. (will it trim? will it work with ssd's at all?)
Thanks
Can we run this over manage engine endpoint central to free up diskspace on remote machines before running patches?
Hey, yes - I just made a single run instance of it on my Github - you'll need to check that the log file path is writable (or possibly change it): github.com/jimrtyler/diskcleaner/blob/main/OneClickCleanC.ps1
In Manage Engine Endpoint central you make a script into a package like this: Navigate to Software Deployment >> Packages and click on "Add Package >> Windows".
Enter the name of the package as desired, and select "EXE / APPX / MSIEXEC / MSU"
Select the license type as "Non Commercial".
For uploading the script in "Locate Installable", there are two ways:
From Shared Folder: If you have the script in a shared folder, you can choose this option and upload the .ps1 file.
From Local Computer: If the script is on the computer via which you're accessing the console, choose this option and upload the .ps1 file.
Once the file has been uploaded, enter the following script under "Installation Command with Switches/Arguments":
"< powershell.exe -ExecutionPolicy RemoteSigned -File (name-of-the-script-file) > "
Click on "Add Package"