CommandInvocationIntrinsics
Class
Definition
Interfaces that cmdlets can use to build script blocks and execute scripts.
public class CommandInvocationIntrinsics
- Inheritance
-
CommandInvocationIntrinsics
Properties
| CommandNotFoundAction |
This event handler is called when a command is not found. If should have a single string parameter that is the name of the command and should return a CommandInfo object or null. By default it will search the module path looking for a module that exports the desired command. |
| HasErrors |
If an error occurred while executing the cmdlet, this will be set to true. |
| PostCommandLookupAction |
This event handler is after the command lookup is done but before the event object is returned to the caller. This allows things like interning scripts to work. If should have a single string parameter that is the name of the command and should return a CommandInfo object or null. |
| PreCommandLookupAction |
This event handler is called before the command lookup is done. If should have a single string parameter that is the name of the command and should return a CommandInfo object or null. |
Methods
| ExpandString(String) |
Returns a string with all of the variable and expression substitutions done. |
| GetCmdlet(String) |
Returns the CmdletInfo object that corresponds to the name argument |
| GetCmdletByTypeName(String) |
Get the cmdlet info using the name of the cmdlet's implementing type. This bypasses session state and retrieves the command directly. Note that the help file and snapin/module info will both be null on returned object. |
| GetCmdlets() |
Returns a list of all cmdlets... |
| GetCmdlets(String) |
Returns all cmdlets whose names match the pattern... |
| GetCommand(String, CommandTypes) | |
| GetCommandName(String, Boolean, Boolean) |
Searches for PowerShell commands, optionally using wildcard patterns and optionally return the full path to applications and scripts rather than the simple command name. |
| GetCommands(String, CommandTypes, Boolean) |
Searches for PowerShell commands, optionally using wildcard patterns |
| InvokeScript(String) |
Executes a piece of text as a script synchronously. |
| InvokeScript(String, Object[]) |
Executes a piece of text as a script synchronously. |
| InvokeScript(SessionState, ScriptBlock, Object[]) | |
| InvokeScript(Boolean, ScriptBlock, IList, Object[]) |
Invoke a scriptblock in the current runspace, controlling if it gets a new scope. |
| InvokeScript(String, Boolean, PipelineResultTypes, IList, Object[]) |
Executes a piece of text as a script synchronously using the options provided. |
| NewScriptBlock(String) |
Compile a string into a script block. |