Basic PowerShell commands that every Windows 10 user should know

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.

Basic PowerShell commands that every Windows 10 user should know

Before we begin, we must highlighted that some of these cmdlets might toggle certain settings or configuration on your computer.

cmdlet is a PowerShell script that performs a single function. So, to be on the 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:

 

 

Table of Contents:

Launch a UWP Application.

Get Help regarding any cmdlet.

Get similar commands.

Find a particular file.

Read the contents of a file.

Find information about all the services on a computer.

Find information about all the processes on a computer.

Setting the Execution Policy.

Copy a file or a directory.

Delete a file or a directory.

Basic PowerShell commands that every Windows 10 user should know

1] Launch a UWP Application

cmdlets are great tools 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:"

 

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

Videos on how to launch a UWP Application in a cmdlet Windows 10 PowerShell

 

Basic PowerShell commands that every Windows 10 user should know

2] Get Help regarding any cmdlet

Windows 10 PowerShell

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.

Videos on how to get help regarding any cmdlet.

 

 

Basic PowerShell commands that every Windows 10 user should know

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.

Videos on how to Get Similar commands in Windows 10 PowerShell

 

Basic PowerShell commands that every Windows 10 user should know

4] Finding a particular file

Windows 10 PowerShell

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 follows:

 

Get-Item <PATH>

 

This lists out the contents of the particular path.

Videos on how to find a particular file in Windows 10 PowerShell

 

 

Basic PowerShell commands that every Windows 10 user should know

5] Read the contents of a file

Windows 10 PowerShell

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

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

This particular example above is the Windows Hosts file. Notice we use $env:SystemRoot in place of C: (drive) and C:\WINDOWS (windows folder). The reason for this is because the drive/network letter and windows installation folder are all user dependant, therefor the system environment variable holds this information.

Videos on how to read the contents of a file in Windows 10 PowerShell

 

Basic PowerShell commands that every Windows 10 user should know

6] Read information about all the services on a computer

Windows 10 PowerShell

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>
Videos on how to read information about all the services on a computer in Windows 10 PowerShell.

 

 

Basic PowerShell commands that every Windows 10 user should know

7] Read information about all the processes on a computer

Windows 10 PowerShell

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>
Videos on how to read information about all the processes on a computer in Windows 10 PowerShell

 

 

Basic PowerShell commands that every Windows 10 user should know

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 follows:

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.

Videos on Setting the Execution Policy in Windows 10 PowerShell

 

 

Basic PowerShell commands that every Windows 10 user should know

9] Copy a file or a directory

Windows 10 PowerShell

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 below:

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

Videos of how to Copy a file or a directory in Windows 10 PowerShell

 

 

Basic PowerShell commands that every Windows 10 user should know

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 as follows:

Remove-Item "E:\Test.txt"
Videos on how to Delete a file or a directory

Related Videos:


Related Posts:

Coding Autorun.inf Script Virus

Top Tools for Ethical hacking in 2020

The Guide to Ethical Hacking

Introduction to Batch File Viruses

What is a Batch file?

Fork Bomb Batch File Virus

Introduction to JavaScript – CONSOLE

Kodi add-on structure

How to download and install Alice 3

USB O.MG cable opens Wi-Fi to remote attacks

What is Unity3D?

Microsoft Office 2016 Activation, as a batch file

Windows 10 Activator Key, Activate Windows 10 with a batch file

Microsoft warns wormable Windows bug could lead to another WannaCry

How to open and use the Terminal app on a Mac computer, with a few basic commands

How to make Windows 10 look and feel like Windows 7

 

 

Connected through code, Choose Your Platform!

About the Author: Bernard Aybout

In the land of bytes and bits, a father of three sits, With a heart for tech and coding kits, in IT he never quits. At Magna's door, he took his stance, in Canada's wide expanse, At Karmax Heavy Stamping - Cosma's dance, he gave his career a chance. With a passion deep for teaching code, to the young minds he showed, The path where digital seeds are sowed, in critical thinking mode. But alas, not all was bright and fair, at Magna's lair, oh despair, Harassment, intimidation, a chilling air, made the workplace hard to bear. Management's maze and morale's dip, made our hero's spirit flip, In a demoralizing grip, his well-being began to slip. So he bid adieu to Magna's scene, from the division not so serene, Yet in tech, his interest keen, continues to inspire and convene.