In this article, we will discover six basic commands that can help you navigate and perform essential tasks in the PowerShell environment.
Get-Help command is your go-to resource for finding information about other PowerShell commands. It provides detailed information, examples, and syntax for cmdlets.
This command retrieves information about the Get-Service cmdlet, including its purpose, parameters, and usage examples.
This command allows you to discover all available commands in your PowerShell session. It helps you explore and find cmdlets to perform specific tasks.
Get-Command -Verb Get
This command lists all cmdlets with the « Get » verb, helping you discover commands related to retrieving information.
It retrieves information about the services on a local or remote computer. This command is useful for checking the status of services.
Here is an exemple :
Get-Service -Name Spooler
This command retrieves information about the « Spooler » service, including its status, display name, and service name.
Provides information about processes running on a computer. It’s handy for monitoring and managing running applications.
Get-Process -Name explorer
This command retrieves information about the « explorer » process, including its ID, CPU usage, and memory consumption.
Set-ExecutionPolicy controls the PowerShell script execution policy, determining whether scripts can be run and from where.
This command sets the execution policy to « RemoteSigned » allowing the execution of local scripts and remote scripts signed by a trusted publisher.
This command terminates one or more running processes. It’s useful for forcefully closing applications that may be unresponsive.
Stop-Process -Name notepad
This command stops all instances of the Notepad process, providing a way to close the application through PowerShell.