10 basic PowerShell commands that every Windows 10 user should know

Windows PowerShell is powerful and can do almost everything that a person wants on his computer. But the only problem is that it is a command line tool and does not have GUI. However, it can be helpful when the GUI based interface fails or stops responding. The main thing unfortunately is the fact that a normal user lacks the knowledge of using PowerShell to its full potential. But today, we will be trying to discuss the top 10 PowerShell commands that can help a user do more on Windows 10.

PowerShell commands that will help a user do more

Before we begin, it is needed to be highlighted that some of these cmdlets might toggle certain settings or configuration on your computer. A cmdlet is a PowerShell script that performs a single function. So, to be on a safer side, create a System Restore point first. If something goes wrong during trying one of the following cmdlets, you can always restore your computer.

We will be taking a look at cmdlets that can do the following:

  1. Launch a UWP Application.
  2. Get Help regarding any cmdlet.
  3. Get similar commands.
  4. Find a particular file.
  5. Read the contents of a file.
  6. Find information about all the services on a computer.
  7. Find information about all the processes on a computer.
  8. Setting the Execution Policy.
  9. Copy a file or a directory.
  10. Delete a file or a directory.

1] Launch a UWP Application

PowerShell is a great tool which can be used to launch UWP Applications within seconds. But the main thing lies in the proper execution of a command. You can use

Start-Process "ms-settings:"

command just to launch the Windows Settings UWP Application. You can learn more about other URIs for other UWP Applications here on microsoft.com.

2] Get Help regarding any cmdlet

If you are ever stuck confused about what command you must be used to execute a specific task. Or what a specific cmdlet does, you do not need worry. You can just use the Get-Help cmdlet to do it. You can use it in the following ways-

Get-Help

Get-Help <command name>

Get-Help <command name> -Full

Get-Help <command name> -Example

Get-Help *

Here, the first entry will guide you on how to use this cmdlet. The second entry will give you a simple summary of the particular cmdlet. The third entry will give detailed information about the respective cmdlet. The fourth entry will comprise of everything that the third cmdlet shows but will add an example of how to use that cmdlet. And finally, the fifth cmdlet will list every command that is available for your use.

3] Get Similar Commands

To find commands of a similar type or that contain a particular phrase in them, you can use the Get-Command cmdlet. However, it does not list out every cmdlet in PowerShell, so you make use of some particular filters. You can use the following commands-

Get-Command -Name <name>

Get-Command -CommandType <type>

The first cmdlet will help you in finding a cmdlet with a particular phrase in it whereas the second one will enable you to filter out cmdlets that perform a particular function.

4] Finding a particular file

If you need to find a particular file or a directory in a particular location, you can use the Get-Item cmdlet. You can use it as

Get-Item <PATH>

to list out the contents of the particular path.

5] Read the contents of a file

If you need to read the contents of a file, you can use the Get-Content command as-

Get-Content <PATH of the file with its extension>

6] Read information about all the services on a computer

basic PowerShell commands

You can use the Get-Service cmdlet to list all the services running or stopped on your computer. Alternatively, you can use the following related cmdlets to do their respective functions-

Start-Service <Service Name>

Stop-Service <Service Name>

Suspend-Service <Service Name>

Resume-Service <Service Name>

Restart-Service <Service Name>

7] Read information about all the processes on a computer

Similar to the Get-Service cmdlet, you can use the Get-Process cmdlet to list all the Processes running on your computer. Alternatively, you can use the following related cmdlets to do their respective functions,

Start-Process <Process Name>

Stop-Process <Process Name>

Wait-Service <Process Name>

8] Setting the Execution Policy

While there is support for creating and executing scripts on PowerShell, there are restrictions to each one of them as a part of some security measures. You can toggle the Security level to any of the 4 levels. You can use the Set-ExecutionPolicy cmdlet followed by any of the security levels given as-

Set-ExecutionPolicy Unrestricted

Set-ExecutionPolicy All Signed

Set-ExecutionPolicy Remote Signed

Set-ExecutionPolicy Restricted

Here, the policies from top to bottom range from lowest to the highest level of security.

9] Copy a file or a directory

A user can make use of the Copy-Item cmdlet to copy one file or directory to another destination. The syntax for this cmdlet is-

Copy-Item "E:\TWCTest.txt" -Destination "D:\"

10] Delete a file or a directory

Similar to the Copy-Item cmdlet, A user can make use of the Copy-Item cmdlet to copy one file or directory to another destination. The syntax for this cmdlet is-

Remove-Item "E:\TWCTest.txt"

Do you have any other useful cmdlets to share with all of us? Feel free to write them down in the comment box below.

Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Ayush has been a Windows enthusiast since the day he got his first PC with Windows 98SE. He is an active Windows Insider since Day 1 and is now a Windows Insider MVP. He has been testing pre-release services on his Windows 10 PC, Lumia, and Android devices.

Leave a Reply

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


2 + 4 =