news

5 Wonderful Things You Can Do with PowerShell

After a long period of using the traditional command prompt screen “cmd”, the updated command prompt screen “PowerShell” was released in 2006. Besides supporting writing and executing “cmd” commands, “PowerShell” gave users some additional features compared to “cmd”, such as the ability to use programming languages like “C” to write and execute code to accomplish tasks within the Windows environment, along with some advanced features like the ability to download files from the internet.

However, despite the advanced capabilities provided by “PowerShell”, many users find “PowerShell” commands more difficult to use, leading some to avoid using it. But through this article, we will explain some amazing things that can be done easily and quickly through the “PowerShell” screen.



First, for those who may not know, you can open a “PowerShell” window by searching in the Windows system or Start menu and typing “PowerShell” then right-clicking and opening it as an administrator through “run as administrator” in order to execute any commands that require “Administrator”permissions without any issues.

You can also download and use the new “Windows Terminal” application from Microsoft, which we highlighted before in this article, and which provides great features including multiple tabs and the ability to run “cmd” or “PowerShell” environments, in addition to running the integrated Linux command prompt within Windows 10.

Stopping Programs and Processes

When facing a “not responding” issue with a program, we often end the program’s operation through the Task Manager to resolve the issue and restart the program. But sometimes it can be difficult to access the Task Manager or the program consists of multiple processes running in the background, requiring you to manually end each process, which can be somewhat annoying.

Fortunately, you can do the same thing through “PowerShell” by simply entering the following command followed by the process name or “Process” related to the program you want to end instead of the word “Process-name”:

stop-process -name Process-name

And if you are not familiar with the process name, you can use the following command first, where you will get a list of all background processes alphabetically arranged:

get-process

Through the resulting table, you can easily access the process name you want to terminate and then copy that name and use the “stop-process” command again to end the process, noticing that the command is executed somewhat faster than the Task Manager.

You can also be more precise by using the process number or “Process id” to stop any process by using the following command, replacing the word “Process-id” with the process number obtained from the “ID” column after executing the get-process command.

stop-process -id Process-id

Verifying File Integrity After Downloading from the Internet

We previously highlighted the “Checksum Hash” technology, explaining how you can use it to verify the integrity of files you have downloaded from the internet before using them. Through “PowerShell,” you can check the “Checksum Hash” for a file without the need for external programs. By using the following command followed by the full path of the file, including the file name and extension instead of the word “Path,” you will get the “Checksum Hash” code for the file:

Get-FileHash Path

After obtaining the “Checksum Hash” code for the file under the “Hash” column, you can compare the resulting value with the original “Hash” value mentioned on the website where you downloaded the file from to ensure the file’s integrity and absence of any modifications, malware, or errors during the download process.}

If the algorithm used to calculate the “Checksum Hash” for the file does not match the one used on the internet site, you can change the default algorithm and specify the name of the algorithm used behind the code by using the “Algorithm” addition to ensure proper comparison:

Get-FileHash Path -algorithm MD5

It is worth noting that “PowerShell” supports multiple algorithms for “Checksum Hash” technology such as SHA1 – SHA256 – SHA384 – SHA512 – MD5 MACTripleDES – RIPEMD160.

All Information About Your Computer

If you are using the command prompt “cmd,” you are probably familiar with the famous “ipconfig” command, which allows you to get information about network connectivity, including your computer’s IP address. However, through the “PowerShell” command prompt and using the following command, you will get information about all connected network adapters to your computer, whether wired or wireless, and even Bluetooth connections, with the ability to know the IP address and Mac Address of any connection from your computer:

get-wmiobject Win32_NetworkAdapterConfiguration | format-table

You can use the command without the “Format table” addition, but the benefit of this addition is to organize the resulting information in a table format so you can review the information more clearly.

Downloading and Installing Programs Directly

If you are familiar with Linux systems, you know that installing programs through Linux distributions is done differently than Windows systems, using what is called a “Package Manager.” Similarly, through “PowerShell,” you can install programs on Windows 10 by simply writing commands. However, you will need to make some settings first to enable this feature as it is still in testing. You can learn the steps to activate it in detail through this article.

After activating the feature, since each program has a specific package name, you can use the following command and type the program name or any part of it instead of the word “name” to get the correct package name:

winget search name

Then write the following command followed by the package name, and it will be downloaded and installed directly:

winget install –name package-name 

It is worth mentioning that the library of programs supported by this feature does not include all programs available for Windows, but you will find several well-known programs like the media player “vlc,” the cloud music player “Spotify,” and “Adobe reader” PDF reader, and many other programs that you can discover yourself.

More Information About Your Computer

A simple part of the information generated from executing the command

Through “PowerShell,” you can get a vast list of information about your computer by using the following command:

Get-ComputerInfo

After executing that command, you will find all the information you can imagine, whether about hardware specifications, driver version numbers, operating system information including the version number, BIOS version, motherboard model, current user name of the computer, and more.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
error: Content is protected!