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 |
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
| # 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
| # 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
| #!/bin/bash | |
| # Script to update deprecated MySQL commands in the automysqlbackup file. | |
| # The automysqlbackup project can be found at: https://sourceforge.net/projects/automysqlbackup/ | |
| # | |
| # The following warnings have been observed when using automysqlbackup: | |
| # | |
| # mysqldump: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-dump' instead | |
| # mysqlshow: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb-show' instead | |
| # mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead |
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
| #!/bin/bash | |
| # Parameters | |
| REMOTE_PATH="/home" # Source path on the remote server | |
| LOCAL_PATH="/mnt/sdb/" # Destination path on the local system "DO NOT REPEAT" destination folder | |
| CERT_PATH="/root/id_rsa_root_hostname.priv.crt" # Path to the SSH certificate | |
| REMOTE_SERVER="host.domain.com" # Hostname or IP address of the remote server | |
| CHECK_MODE="--dry-run" # Use "--dry-run" for a dry run, leave empty for normal operation | |
| # File permission options |
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
| #!/bin/bash | |
| # Filter parameter for the home directory | |
| filter_string="home" | |
| # Optional filter parameter for the user group (default is empty) | |
| group_filter="users" | |
| # Default dry-run flag (true) | |
| dry_run=true | |
| # Function to display usage information |
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
| #!/bin/bash | |
| # Define parameters at the top | |
| USERNAME="max.mustermann" # Username for which to set the password | |
| USER_PASSWORD="" # Leave empty to generate a password automatically | |
| EXPIRATION_MINUTES=60 # Password expiration time in minutes | |
| PASSWORD_LENGTH=6 # Length of the generated password | |
| USE_SPECIAL=false # Set to false to exclude special characters in the password | |
| # Function to check if the user exists and provide output |
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
| #!/bin/bash | |
| # Configuration: Define recipients (space-separated emails) | |
| RECIPIENTS="administrator@example.com" | |
| # Constants | |
| DASHES="##############################" | |
| # Function: Check for updates | |
| check_updates() { |
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
| #!/bin/bash | |
| # =========================== | |
| # Service Configuration | |
| # =========================== | |
| # Format: "<Service Name>;<Check Command>;<Expected String>" | |
| SERVICES=( | |
| "apache;apachectl configtest;Syntax OK" | |
| #"haproxy;haproxy -c -f /etc/haproxy/haproxy.cfg;Configuration file is valid" | |
| "nginx;nginx -t;syntax is ok" |
OlderNewer