Command Naming Reference
GENESIS PowerShell commands follow a small, consistent set of naming patterns. Because the same patterns apply to every provider, you can derive almost any command name from a verb and an entity rather than looking it up. This topic documents those patterns and the special-purpose commands that fall outside them. For the concepts behind entities and keys, see Entities, Keys, and the Command Model; to find which module a command belongs to, see the PowerShell Module Reference.
Entity Command Pattern
Most commands take the form Verb-PrefixEntity, where the verb is one of four standard actions, the prefix identifies the provider module, and the entity is the configurable item. For example, New-AcEquipment is New + Ac (Assets) + Equipment.
|
Verb |
Purpose |
Example |
|---|---|---|
|
|
Reads an entity, all entities of a type, or the children of a parent. |
|
|
|
Creates a new entity. |
|
|
|
Updates an existing entity; only the supplied parameters change. |
|
|
|
Deletes an entity. |
|
Get Forms
The Get verb has three forms for every entity type:
|
Form |
Returns |
Example |
|---|---|---|
|
|
The single entity you identify by name, key, or identifier. |
|
|
|
Every entity of the specified type. |
|
|
|
The children of the specified parent entity. |
|
The plural is formed by appending s to the entity name as the command set defines it, which is why some commands read as ...Items (Get-TrgDataItems) and others as ...es or irregular plurals. Use Get-Command to confirm the exact spelling for a given entity. Learn more
Common Entity Parameters
Most New and Set commands accept the following parameters in addition to the entity-specific ones:
|
Parameter |
Notes |
|---|---|
|
|
The entity to act on, identified by a name, key, or identifier. Mandatory and positional (position 0) on single-entity commands. |
|
|
The parent entity, identified by a name, key, or identifier. Omit to create at the provider's root. Default: (null)—root. |
|
|
Free-text description. Default: (null). |
|
|
On |
Special Commands
Some commands sit outside the entity pattern and provide cross-cutting capabilities. These come from the IcoWorkbenchPowershell and IcoConfigPowershell modules.
Targeting a host
|
Command |
Purpose |
|---|---|
|
|
Reports the host whose configuration the session is currently changing. |
|
|
Retargets the session to a different Workbench host. Every subsequent command applies there. |
Examples:
Building keys
Keys reference an entity without loading it. Learn more
|
Command |
Purpose |
|---|---|
|
|
Builds a key from an entity type name and database identifier. |
|
|
Creates an empty key that is used where the command requires a key placeholder. |
|
|
Creates a key that refers to a provider's root. |
|
|
Creates a type reference. |
Examples:
Configuration and helpers
|
Command |
Purpose |
|---|---|
|
|
Exports configuration from the current host. |
|
|
Imports configuration into the current host. |
|
|
Bulk-duplicates the configuration. |
|
|
Generates a GUID for parameters that require one. |
|
|
Backs up a configuration database and lists available restore points. |
Worked Example
The following example uses the patterns together: it builds a key for a collector group, reads a logging group's key, and passes both into a New command to create a Data Historian tag.
Related Topics: