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
| # Script Description: | |
| # This script safely deletes temporary files from the Windows partition, clears the Recycle Bin, | |
| # removes the Windows Update cache, and cleans up the user's temp folder. | |
| # Run with "powershell -ExecutionPolicy Bypass -File .\Clean-SystemDrive.ps1" | |
| # Requires administrative privileges | |
| if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
| Write-Error "Please run this script as an Administrator." | |
| exit | |
| } |
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
| # Logs to extract from server | |
| $logArray = @("System","Security","Application", "Setup") | |
| # Grabs the server name to append to the log file extraction | |
| $servername = $env:computername | |
| # Provide the path with ending "\" to store the log file extraction. | |
| $destinationpath = "C:\WindowsEventLogs\" | |
| # Checks the last character of the destination path. If it does not end in '\' it adds one. |
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
| # Enable Devoloper Options | |
| # Download E5 USB-Driver http://www.motorola.com/getmdmwin | |
| # Minimal and Install minimal ADB and fastboot https://androidmtk.com/download-minimal-adb-and-fastboot-tool | |
| # ADB command to search for packages | |
| pm list packages | grep "moto" | |
| # ADB command to uninstall Bloatware but keep data | |
| pm uninstall -k --user 0 <package name> | |
| # ADB command to uninstall Bloatware and remove its data | |
| pm uninstall --user 0 <package name> |
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
| # Export subscribed | |
| $wsusServer = Get-WsusServer -Name $WSUS_HOSTNAME -Port 8530 | |
| $wsusSubscription = $wsusServer.GetSubscription() | |
| $selectedProducts = $wsusSubscription.GetUpdateCategories() | Select Title | |
| $selectedCategories = $wsusSubscription.GetUpdateClassifications() | select Title | |
| # Export full list | |
| (Get-WsusServer | Get-WsusClassification).Classification.Title | |
| (Get-WsusServer | Get-WsusProduct).Product.Title |
NewerOlder