CBC Computer Services

PowerShell Scripts

PowerShell Script to Restart Computer into Bios Screen

Here’s a PowerShell script to restart a Windows computer and boot directly into the BIOS or UEFI settings. This script leverages the Restart-Computer cmdlet with the appropriate parameter to reboot into the firmware: Explanation: Important Notes: To run this script: This should reboot your system and take you directly to the BIOS or UEFI setup…

Read More

PowerShell Script to Reset Host Files

Here’s a PowerShell script to reset the Windows hosts file to its default state. The hosts file is located at C:\Windows\System32\drivers\etc\hosts and typically contains a default entry for localhost. Steps to run the script: This restores the default hosts file configuration, which typically includes only the localhost entries.

Read More

PowerShell script to delete a Windows user account:

Here’s a PowerShell script to delete a Windows user account: Steps to run the script: The script checks if the user exists and deletes the account. If the user doesn’t exist, it will output an error message. Let me know if you need any changes!

Read More

PowerShell Script to Uninstall Recent Updates

If you need to uninstall recent Windows updates, you can use PowerShell to manage this task. Here’s a script that helps you find and uninstall recent updates. This script uses the Get-HotFix cmdlet to list installed updates and the wusa.exe command to uninstall specific updates. PowerShell Script to Uninstall Recent Updates How to Use This…

Read More

PowerShell Script to Reset Winsock

To reset Winsock using PowerShell, you can use the netsh command, which is designed for network configuration and troubleshooting. Winsock (Windows Sockets API) controls how Windows programs access network services, so resetting it can resolve network connectivity issues, such as slow speeds or a malfunctioning internet connection. This can be particularly useful if you’re experiencing…

Read More

Use PowerShell to Get System Summary

To get a summary of your system’s hardware and software configuration using PowerShell, you can use various cmdlets and scripts to gather detailed information. Here’s a PowerShell script that provides a comprehensive system summary, including details about the operating system, processor, memory, disk, and network configuration. PowerShell Script to Get System Summary How to Use…

Read More