Category Archives: Tutorials
Automating System Updates with Unattended-Upgrades on Ubuntu
Maintaining an up-to-date system is crucial for security and stability. On Debian and Ubuntu systems, the unattended-upgrades
package simplifies this process by automating the installation of security updates and essential package upgrades. This guide provides a comprehensive overview of installing, configuring, and managing unattended-upgrades
to ensure your system remains secure with minimal manual intervention.
To automate the installation and configuration of Unattended-Upgrades on Ubuntu 24.04 you can create a shell script that performs the following tasks:
- Install the Unattended-Upgrades Package: Ensure the package is installed.
- Enable Automatic Updates: Configure the system to perform daily package list updates and unattended upgrades.
- Configure Unattended-Upgrades: Modify settings to include regular package updates and set up email notifications.
Here’s a script that accomplishes these steps:
#!/bin/bash # Update package lists and install unattended-upgrades sudo apt update && sudo apt install -y unattended-upgrades # Enable automatic updates sudo tee /etc/apt/apt.conf.d/20auto-upgrades > /dev/null
How to Add a Large Disk Partition as Storage in Proxmox VE
If you’re running a Proxmox Virtual Environment (VE) and need additional storage for virtual machines, backups, or ISO images, adding a large disk partition can optimize your setup and expand capacity. In this guide, we’ll walk you through the steps to add a specific partition as new storage in Proxmox, from formatting and mounting to configuring it in the Proxmox GUI. Whether you’re dealing with local storage or networked drives, this guide covers everything you need to ensure your storage upgrade is smooth and efficient, keeping your Proxmox VE environment scalable and ready for growth.
Adding new storage to Proxmox can be done in a few steps, depending on the type of storage you want to add (e.g., local disk, NFS, or iSCSI). Here’s a guide for adding different types of storage:
1. Adding Local Storage
- Step 1: First, identify the new disk by running:
bash lsblk
- Step 2: Partition
How to Remove Radmin Viewer with PowerShell
Radmin Viewer, widely used for remote control and network monitoring, sometimes requires uninstallation across multiple devices, especially in managed environments. Using PowerShell to remove it is efficient and can be automated through Remote Monitoring and Management (RMM) tools, simplifying the process for IT administrators. This guide provides a PowerShell script to detect and remove Radmin Viewer, which you can deploy seamlessly through most RMM tools.
How to Remove Radmin Viewer with PowerShell
- Set Up the Script in Your RMM Tool: Most RMM tools, such as SuperOPS, Syncro, or N-Able, support PowerShell scripts. Copy the script below into the scripting or automation section of your RMM tool and configure it to run with administrative privileges.
- Run the Script to Detect and Uninstall Radmin Viewer: Once set up, this script will automatically detect and uninstall Radmin Viewer if installed.
# Define the partial name for Radmin Viewer, allowing for
How to Automate Ubuntu Server System Updates and Package Installation
Keeping your Ubuntu system updated and installing essential packages can be done efficiently using a simple Bash script. This guide will walk you through creating a script that automates system updates, upgrades installed packages, and installs specific packages of your choice. You can run the script manually or schedule it to execute automatically at a set time using cron jobs.
Step-by-Step Guide
Step 1: Create the Bash Script
Start by creating a new script file, for example, update_and_install.sh
. This script will handle all the necessary steps for updating your system.
Example Script: update_and_install.sh
#!/bin/bash # Update package list echo "Updating package list..." sudo apt update # Check if dpkg was interrupted and run 'sudo dpkg --configure -a' if necessary if [ $? -ne 0 ]; then echo "Checking for dpkg errors..." dpkg_error=$(sudo apt update 2>&1 | grep "dpkg was interrupted") if [ -n "$dpkg_error" ]; then echo "Error detected:
How to Remove User Pin with PowerShell
Learn how to remove user PINs using PowerShell with this step-by-step guide and sample script for managing biometric authentication on Windows systems.
PowerShell offers a variety of tools to help automate and manage tasks in Windows environments. In this guide, we’ll show you how to remove a user’s PIN using PowerShell. Removing a PIN from a system can be part of user management, security protocols, or resetting biometric authentication methods. Here’s a step-by-step process along with a sample script that utilizes the BiometricAuthentication
PowerShell module.
Step 1: Install the Required Module
Before running the script, you need to ensure that you have the necessary PowerShell module. In this case, the module BiometricAuthentication
is required for managing biometric authentication, including PINs.
To install the module, run:
Install-Module -Name "BiometricAuthentication" -Force
Step 2: Use the Script to Remove the PIN
The script below finds users with PINs and removes them:
# Import
How to Automate Microsoft Edge Updates with PowerShell
Learn how to automate Microsoft Edge updates using a simple PowerShell script, ensuring your systems stay secure and up-to-date effortlessly. Microsoft Edge, like many other applications, frequently receives updates that improve performance, add new features, and address security vulnerabilities. However, manually checking for updates can be time-consuming, especially in a business environment where automation is key.
Automating Microsoft Edge Updates
The script below allows you to automate the process of installing updates for Microsoft Edge. It works by executing the Microsoft Edge Update executable with specific arguments to silently check for and install updates.
$EdgeUpdatePath = "C:\Program Files (x86)\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" $ArgumentList = "/silent /install appguid={56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}&appname=Microsoft%20Edge&needsadmin=True" $Process = Start-Process -FilePath $EdgeUpdatePath -ArgumentList $ArgumentList -PassThru -Wait if ($Process.ExitCode -eq 0) { Write-Host "Update successfully installed." } else { Write-Host "Update failed to install." }
Why Automate Edge Updates?
Automating updates is especially useful for IT administrators managing multiple machines. It ensures that all … Read the rest
How to Remove Dell Support Assist & Command Update with PowerShell
This PowerShell script is designed specifically to automate the removal of Dell SupportAssist and Dell Command | Update applications from systems. These Dell utilities are often pre-installed on Dell machines, and while useful for some environments, they may need to be removed for compliance, standardization, or even mitigating a potential vulnerability.
Script Overview:
- Targeted Uninstallation: The script uses application name matching to locate and uninstall Dell SupportAssist and Dell Command | Update silently.
- Automation-Friendly: Ideal for use in large-scale deployments, this script can be run remotely or as part of an automation process.
- Silent Execution: The uninstallation process runs quietly without user prompts, making it suitable for background execution.
This script provides an efficient and streamlined way to remove these common Dell utilities across multiple devices in your environment.
Steps to Run the PowerShell Script:
1. Open PowerShell with Administrator Privileges:
- Click on the Start menu, search for “PowerShell.”
- Right-click
How to Automate Disk Cleanup with PowerShell
Optimize your system’s performance with automated Disk Cleanup using PowerShell, ensuring thorough file removal across all user accounts effortlessly.
To run Disk Cleanup as the system user and clean up files for all user accounts on the computer using PowerShell, you can follow these steps:
- Run Disk Cleanup as System User: To perform Disk Cleanup with elevated privileges, use the
schtasks
command to schedule a task that runs as the system user. This task will be set to clean up system files and files from all user accounts. - Execute Disk Cleanup: The
cleanmgr
utility can be used to run Disk Cleanup. However, there isn’t a direct way to specify all user accounts usingcleanmgr
. Instead, you can automate the process using theDism
(Deployment Imaging Service and Management Tool) command, which can clean up system components and Windows Update files.
Here’s an example PowerShell script to accomplish this:
#
Scanning Directories for Files with PowerShell
Learn how Scanning Directories for Files with PowerShell can help you locate specific files, making it easy to identify their paths, sizes, and modification dates.
Script Overview
The PowerShell script provided below searches for .xlsx
files starting from the root directory C:\
. It recursively scans through all subdirectories and returns a list of files that match the specified criteria. For each found file, it displays the full file path, file size, and the last modified date.
Get-ChildItem -Path C:\ -Recurse -Include *filenamehere.xlsx | Select-Object FullName, Length, LastWriteTime
Explanation of the Script
- Get-ChildItem: This cmdlet retrieves the items (files and directories) from a specified location. It can be used to list files and directories in a given path.
- **-Path C:**: This specifies the starting point for the search, which is the root directory
C:\
. You can change this to any directory you want to start your search from.
How to Install AWS CLI on Ubuntu 24.04
The Amazon Web Services (AWS) Command Line Interface (CLI) is a powerful tool that allows you to manage AWS services from a terminal session on your Ubuntu system. With the AWS CLI, you can efficiently control multiple AWS services and automate tasks through scripts. This guide will walk you through the steps to install AWS CLI on Ubuntu, ensuring you have the tools needed to manage your cloud infrastructure seamlessly.
Step 1: Update Your System
Before you install any new software, it’s always a good idea to update your system to ensure all existing packages are up to date. Open your terminal and run the following commands:
sudo apt update && sudo apt upgrade -y
Step 2: Install AWS CLI Using APT
The AWS CLI can be installed using the apt
package manager. To do this, you need to add the AWS CLI repository to your system.