👨‍💻 Windows Powershell: What is That and How to Use It? Main Commands 🖥️⚙️
Channel: Hetman Software: Data Recovery for Windows
Date: 2020-02-18

👍 In today’s video, we will discuss Windows PowerShell to find out what is that, why we need it, what are its main functions and commands, and we will also explore writing and running some simple scripts. 

👉How to Create an Image With a Backup Copy of Windows 10: https://hetmanrecovery.com/recovery_news/how-to-create-image-backup-copy-windows-10.htm

Content:
0:00 - What is PowerShell and why we need it? 
2:21 - PowerShell functionality and main commands. 
4:02 - Main commands. 
8:10 - Write and run simple scripts.

To go to the registry branch HKEY_LOCAL_MACHINESOFTWARE you should type the following:  
cd hklm:software

To list all pseudonyms with their prototypes, enter the following command:
gal | select name, definition

The Get-Command is used to display the list of available commands, and after running Help Get-Command you will see a compete description of the command Get-Command, including its purpose, syntax, options etc.

Using another command, Get-Service, you will see the list of all services running on this computer. 

To view the list of processes running at the moment, type the command Get-Process. 

The command Set-Content (or its pseudonym sc) is used to write values into a file. If the designated target file doesn’t exist, this command will create it. The example below illustrates how the value "My data" is written into a file named newfile.txt:
sc mynewfile.txt -value "My data"

The opposite of sc is the command Get-Content (gc). The command gc is used to read contents of a file. For example, the command shown below helps you display the contents of the file newfile.txt:
gc mynewfile.txt

The command Get-Eventlog lets you extract Windows event logs. Just like with Get-Process, there is no need to use any additional tools. The example below illustrates extracting 10 latest entries from the event log:
get-eventlog -newest 10 -logname system

To receive information on on process only, add its name after Get-Process. 
Get-Process and the process name.
Get-Process explorer
 
The following script writes text to a file:
“Hello!” | Out-File C:\test.txt

After your PowerShell testing period is over, don’t forget to enable the setting to run only signed files again. Type the following command:
 
Set-ExecutionPolicy AllSigned

Commands CD, DIR, START, COPY, XCOPY, MD, REN, DEL, EXIT, LogOff, ShutDown for Command Prompt - https://www.youtube.com/watch?v=WzvwywRbVmE

That is all for now! Hopefully, this video was useful. Remember to click the Like button and subscribe to our channel. Hit the bell button to receive notifications and never miss new videos. Leave comments to ask questions. Thank you for watching. Good luck.

Other videos: #powershell, #cmd, #commandprompt