More PowerShell commands

New PowerShell commands come with the new version of Windows 10, PowerShell is a replacement for the good old DOS box, DOS used to be the only way to run commands on your system. PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the.NET Framework.

You should always run PowerShell as an administrator, right-click on the PowerShell icon – Run as administrator if you are running X64 bit OS, then always use the X64 version.

1 Get-Help

The first PowerShell cmdlet every administrator should learn is Get-Help. You can use this command to get help with any other command. For example, if you want to know how the Get-Process command works, you can type:
Get-Help -Name Get-Process

2 Execution policy

Set-ExecutionPolicy Restricted -Scope LocalMachine -Force

Set-ExecutionPolicy AllSigned -Scope LocalMachine -Force

Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force

Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force

Set-ExecutionPolicy Undefined -Scope LocalMachine -Force

3 Get-ExecutionPolicy

If you’re working on an unfamiliar server, you’ll need to know what execution policy is in use before you attempt to run a script. You can find out by using the Get-ExecutionPolicy

4 Get-Service

The Get-Service command provides a list of all the services that are installed on the system. If you are interested in a specific service you can append the -Name switch and the name of the service (wildcards are permitted) When you do, Windows will show you the service’s state.

5 Get-Process

Just as you can use the Get-Service command to display a list of all the system services, you can use the Get-Process command to display a list of all the processes that are currently running on the system.

6 Stop-Process

Sometimes, a process will freeze up. When this happens, you can use the Get-Process command to get the name or the process ID for the process that has stopped responding. You can then terminate the process by using the Stop-Process command. You can terminate a process based on its name or on its process ID. For example, you could terminate Notepad by using one of the following commands:

Stop-Process -Name notepad
Stop-Process -ID 2668

Check out my free software page for useful tools and apps