Appendix J. Standard PowerShell Verbs

Cmdlets and scripts should be named using a Verb-Noun syntax, for example, Get-ChildItem. The official guidance is that, with rare exception, cmdlets should use the standard PowerShell verbs. They should avoid any synonyms or concepts that can be mapped to the standard. This allows administrators to quickly understand a set of cmdlets that use a new noun.

Note

To quickly access this list (without the definitions), type Get-Verb.

Verbs should be phrased in the present tense, and nouns should be singular. Tables J-1 through J-6 list the different categories of standard PowerShell verbs.

Table J-1. Standard Windows PowerShell common verbs

Verb

Meaning

Synonyms

Add

Adds a resource to a container or attaches an element to another element

Append, Attach, Concatenate, Insert

Clear

Removes all elements from a container

Flush, Erase, Release, Unmark, Unset, Nullify

Close

Removes access to a resource

Shut, Seal

Copy

Copies a resource to another name or container

Duplicate, Clone, Replicate

Enter

Sets a resource as a context

Push, Telnet, Open

Exit

Returns to the context that was present before a new context was entered

Pop, Disconnect

Find

Searches within an unknown context for a desired item

Dig, Discover

Format

Converts an item to a specified structure or layout

Layout, Arrange

Get

Retrieves data

Read, Open, Cat, Type, Dir, Obtain, Dump, Acquire, Examine, Find, Search

Hide

Makes a display not visible

Suppress

Join

Joins a resource

Combine, Unite, Connect, Associate

Lock

Locks a resource

Restrict, Bar

Move

Moves a resource

Transfer, Name, Migrate

New

Creates a new resource

Create, Generate, Build, Make, Allocate

Open

Enables access to a resource

Release, Unseal

Pop

Removes an item from the top of a stack

Remove, Paste

Push

Puts an item onto the top of a stack

Put, Add, Copy

Redo

Repeats an action or reverts the action of an Undo

Repeat, Retry, Revert

Remove

Removes a resource from a container

Delete, Kill

Rename

Gives a resource a new name

Ren, Swap

Reset

Restores a resource to a predefined or original state

Restore, Revert

Select

Creates a subset of data from a larger data set

Pick, Grep, Filter

Search

Finds a resource (or summary information about that resource) in a collection (does not actually retrieve the resource but provides information to be used when retrieving it)

Find, Get, Grep, Select

Set

Places data

Write, Assign, Configure

Show

Retrieves, formats, and displays information

Display, Report

Skip

Bypasses an element in a seek or navigation

Bypass, Jump

Split

Separates data into smaller elements

Divide, Chop, Parse

Step

Moves a process or navigation forward by one unit

Next, Iterate

Switch

Alternates the state of a resource between different alternatives or options

Toggle, Alter, Flip

Unlock

Unlocks a resource

Free, Unrestrict

Use

Applies or associates a resource with a context

With, Having

Watch

Continually monitors an item

Monitor, Poll

Table J-2. Standard Windows PowerShell communication verbs

Verb

Meaning

Synonyms

Connect

Connects a source to a destination

Join, Telnet

Disconnect

Disconnects a source from a destination

Break, Logoff

Read

Acquires information from a nonconnected source

Prompt, Get

Receive

Acquires information from a connected source

Read, Accept, Peek

Send

Writes information to a connected destination

Put, Broadcast, Mail

Write

Writes information to a nonconnected destination

Puts, Print

Table J-3. Standard Windows PowerShell data verbs

Verb

Meaning

Synonyms

Backup

Backs up data

Save, Burn

Checkpoint

Creates a snapshot of the current state of data or its configuration

Diff, StartTransaction

Compare

Compares a resource with another resource

Diff, Bc

Compress

Reduces the size or resource usage of an item

Zip, Squeeze, Archive

Convert

Changes from one representation to another when the cmdlet supports bidirectional conversion or conversion of many data types

Change, Resize, Resample

ConvertFrom

Converts from one primary input to several supported outputs

Export, Output, Out

ConvertTo

Converts from several supported inputs to one primary output

Import, Input, In

Dismount

Detaches a name entity from a location in a namespace

Dismount, Unlink

Edit

Modifies an item in-place

Change, Modify, Alter

Expand

Increases the size or resource usage of an item

Extract, Unzip

Export

Stores the primary input resource into a backing store or interchange format

Extract, Backup

Group

Combines an item with other related items

Merge, Combine, Map

Import

Creates a primary output resource from a backing store or interchange format

Load, Read

Initialize

Prepares a resource for use and initializes it to a default state

Setup, Renew, Rebuild

Limit

Applies constraints to a resource

Quota, Enforce

Merge

Creates a single data instance from multiple data sets

Combine, Join

Mount

Attaches a named entity to a location in a namespace

Attach, Link

Out

Sends data to a terminal location

Print, Format, Send

Publish

Make a resource known or visible to others

Deploy, Release, Install

Restore

Restores a resource to a set of conditions that have been predefined or set by a checkpoint

Repair, Return, Fix

Save

Stores pending changes to a recoverable store

Write, Retain, Submit

Sync

Synchronizes two resources with each other

Push, Update

Unpublish

Removes a resource from public visibility

Uninstall, Revert

Update

Updates or refreshes a resource

Refresh, Renew, Index

Table J-4. Standard Windows PowerShell diagnostic verbs

Verb

Meaning

Synonyms

Debug

Examines a resource, diagnoses operational problems

Attach, Diagnose

Measure

Identifies resources consumed by an operation or retrieves statistics about a resource

Calculate, Determine, Analyze

Ping

Determines whether a resource is active and responsive (in most instances, this should be replaced by the verb Test)

Connect, Debug

Repair

Recovers an item from a damaged or broken state

Fix, Recover, Rebuild

Resolve

Maps a shorthand representation to a more complete one

Expand, Determine

Test

Verify the validity or consistency of a resource

Diagnose, Verify, Analyze

Trace

Follow the activities of the resource

Inspect, Dig

Table J-5. Standard Windows PowerShell life cycle verbs

Verb

Meaning

Synonyms

Approve

Gives approval or permission for an item or resource

Allow, Let

Assert

Declares the state of an item or fact

Verify, Check

Complete

Finalizes a pending operation

Finalize, End

Confirm

Approves or acknowledges a resource or process

Check, Validate

Deny

Disapproves or disallows a resource or process

Fail, Halt

Disable

Configures an item to be unavailable

Halt, Hide

Enable

Configures an item to be available

Allow, Permit

Install

Places a resource in the specified location and optionally initializes it

Setup, Configure

Invoke

Calls or launches an activity that cannot be stopped

Run, Call, Perform

Register

Adds an item to a monitored or publishing resource

Record, Submit, Journal, Subscribe

Request

Submits for consideration or approval

Ask, Query

Restart

Stops an operation and starts it again

Recycle, Hup

Resume

Begins an operation after it has been suspended

Continue

Start

Begins an activity

Launch, Initiate

Stop

Discontinues an activity

Halt, End, Discontinue

Submit

Adds to a list of pending actions or sends for approval

Send, Post

Suspend

Pauses an operation, but does not discontinue it

Pause, Sleep, Break

Uninstall

Removes a resource from the specified location

Remove, Clear, Clean

Unregister

Removes an item from a monitored or publishing resource

Unsubscribe, Erase, Remove

Wait

Pauses until an expected event occurs

Sleep, Pause, Join

Table J-6. Standard Windows PowerShell security verbs

Verb

Meaning

Synonyms

Block

Restricts access to a resource

Prevent, Limit, Deny

Grant

Grants access to a resource

Allow, Enable

Protect

Limits access to a resource

Encrypt, Seal

Revoke

Removes access to a resource

Remove, Disable

Unblock

Removes a restriction of access to a resource

Clear, Allow

Unprotect

Removes restrictions from a protected resource

Decrypt, Decode

..................Content has been hidden....................

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