Approved verb list

 

A best practice is to always use verbs from the approved verb list. Some of the verbs will be needed very frequently. I have extracted the most important ones, which you will need to know in the early stages because they will be used very frequently. All of the verbs can be retrieved with Get-Verb:

Verb

AliasPrefix

Group

Description

Add

a

Common

Adds a resource to a container or attaches an item to another item.

Find

fd

Common

Looks for an object in a container that is unknown, implied, optional, or specified.

Get

g

Common

Specifies an action that retrieves a resource.

New

n

Common

Creates a resource.

Show

sh

Common

Makes a resource visible to the user.

Convert

cv

Data

Changes the data from one representation to another, when the cmdlet supports bidirectional conversion or when the cmdlet supports conversion between multiple data types.

ConvertFrom

cf

Data

Converts one primary type of input (the cmdlet noun indicates the input) to one or more supported output types.

ConvertTo

ct

Data

Converts from one or more types of input to a primary output type (the cmdlet noun indicates the output type).

Out

o

Data

Sends data out of the environment.

Test

t

Diagnostic

Verifies the operation or consistency of a resource.

Start

sa

Lifecycle

Initiates an operation.

Stop

sp

Lifecycle

Discontinues an activity.

 

With this list, you can get familiar with some of the cmdlets. In the following code block, I used the command to find commands with a specific verb. With the Get-Help cmdlet, you can take a look at the cmdlet's description parameters and examples: 

#Getting in touch with important cmdlets
Get-Command Get-*
Get-Command Set-*
Get-Command New-*
Get-Command Out-*

#Example for Get-Process
Get-Help Get-Process -Examples

#Testing one
Get-Process powershell -FileVersionInfo
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.150.163