Category: Windows

Just another Tech site

PowerShell script for server information in an email report

PowerShell script that gathers server CPU and memory utilization, disk space, and uptime, generates a report, and sends it via email to IT Support. This script uses WMI and requires SMTP configuration for email functionality. # **Configuration Section** $SMTPServer = “smtp.yourdomain.com” # Replace with your SMTP server $SMTPPort = 587 # Replace with your SMTP…
Read more

Remote Desktop shortcut

Remote Desktop shortcut Description Alt + Home Start Menu Alt + Page Up Alt + Tab switcher Alt + Page Down Shift + Alt + Tab switcher Alt + Insert Cycle through open apps Alt + Delete Open the window menu of the active window Ctrl + Alt + End Ctrl + Alt + Del…
Read more

Server Status Report

Server Status Report from PowerShell to HTML for CPU, Memory, IP Address, and Hard Drive information. # Define the input file containing server names (one per line) $ServerListFile = “D:\Lists\Servers.txt” # Text file containing server names (one per line) # Define the output HTML file $OutputHtmlFile = “C:\Logs\ServerStatusReporttbl.html” # Path to save the HTML report…
Read more

Powershell run 5 batch file, create a log file, and verify folder location if not create folder

Below is a PowerShell script that will run five batch files, create a log file, and verify if a folder exists. If the folder does not exist, it will create the folder. # Define the folder path and log file path $folderPath = “C:\YourFolderPath” $logFilePath = “C:\YourFolderPath\log.txt” # Verify if the folder exists, if not,…
Read more

Powershell run 5 batch files, create a log file, and verify folder location

Recently was asked to run a series of batch files. Below is a PowerShell script that will run five batch files, create a log file for each execution, and verify the folder location before running the batch files. # Define the folder location and batch files $folderPath = “C:\Path\To\Your\BatchFiles” $batchFiles = @(“batch1.bat”, “batch2.bat”, “batch3.bat”, “batch4.bat”,…
Read more

PowerShell script function file download, unblock and install with multiple parameters and return installed version

Here’s a PowerShell script that defines a function to download a file, unblock it, install it, and return the installed version. The function accepts multiple parameters for flexibility. function Install-Software { param ( [Parameter(Mandatory = $true)] [string]$DownloadUrl, [Parameter(Mandatory = $true)] [string]$DestinationPath, [Parameter(Mandatory = $true)] [string]$InstallerArguments, [Parameter(Mandatory = $true)] [string]$VersionCommand ) try { # Step 1:…
Read more

PowerShell – BIOS Version

Looking to see what the current BIOS version is by running the following PowerShell script. This provides Manufacturer, version and the release date       $bios = Get-CimInstance -ClassName CIM_BIOSElement $bios | Select-Object Manufacturer, Version, ReleaseDate    

PowerShell Function to Set-RegistryValueForAllUsers

Below is a PowerShell function that sets a registry value for all users on a Windows machine. This function will iterate through all user profiles and set the specified registry value. function Set-RegistryValueForAllUsers { param ( [Parameter(Mandatory = $true)] [string]$RegistryPath, [Parameter(Mandatory = $true)] [string]$ValueName, [Parameter(Mandatory = $true)] [string]$ValueData, [Parameter(Mandatory = $false)] [Microsoft.Win32.RegistryValueKind]$ValueType = [Microsoft.Win32.RegistryValueKind]::String )…
Read more

PowerShell to set the registry for all users

Here is a PowerShell script that sets a registry value for all users on a Windows machine. This script modifies the registry under the HKEY_USERS hive, which contains subkeys for each user profile. # Define the registry path and value $registryPath = “Software\YourApp\Settings” $valueName = “YourSetting” $valueData = “YourValue” # Get all user SIDs $userSIDs…
Read more

Registry – Windows 11 move Start Menu to left

Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] “TaskbarAl”=dword:00000000 Some people are used to legacy way of previous OS version’s, and this is an easy way to move from the center to the left the Start Menu.