API Reference
AsyncPSCmdlet
Base class for asynchronous PowerShell cmdlets.
Inheritance
- PSCmdlet
- AsyncPSCmdlet
Methods
BeginProcessing() #Invoked when the cmdlet begins execution. Runs BeginProcessingAsync within the asynchronous pipeline.
BeginProcessingAsync() #Performs initialization logic for the cmdlet.
Returns
A Task representing the asynchronous operation.
EndProcessing() #Invoked once when processing has completed. Runs EndProcessingAsync within the asynchronous pipeline.
EndProcessingAsync() #Performs cleanup logic for the cmdlet.
Returns
A Task representing the asynchronous operation.
ProcessRecord() #Processes input records synchronously and dispatches ProcessRecordAsync.
ProcessRecordAsync() #Executes the main cmdlet logic.
Returns
A Task representing the asynchronous operation.
StopProcessing() #Requests cancellation of the cmdlet execution.
ThrowIfStopped() #Throws if the cmdlet execution has been stopped.
Inherited Methods
public PathInfo CurrentProviderLocation(String providerId) #PathInfoParameters
- providerId String
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
public Collection<String> GetResolvedProviderPathFromPSPath(String path, out ProviderInfo provider) #Collection<String>Parameters
- path String
- provider ProviderInfo
public override String GetResourceString(String baseName, String resourceId) #StringParameters
- baseName String
- resourceId String
public String GetUnresolvedProviderPathFromPSPath(String path) #StringParameters
- path String
public Object GetVariableValue(String name, Object defaultValue) #ObjectParameters
- name String
public Boolean ShouldContinue(String query, String caption) #BooleanParameters
- query String
- caption String
- hasSecurityImpact Boolean
- yesToAll Boolean
- noToAll Boolean
public Boolean ShouldProcess(String verboseDescription, String verboseWarning, String caption) #BooleanParameters
- verboseDescription String
- verboseWarning String
- caption String
- shouldProcessReason ShouldProcessReason
public Void ThrowTerminatingError(ErrorRecord errorRecord) #VoidParameters
- errorRecord ErrorRecord
public Void WriteCommandDetail(String text) #VoidParameters
- text String
public Void WriteDebug(String text) #VoidWrites a debug message to the pipeline.
Parameters
- message System.String
- The debug message.
public Void WriteError(ErrorRecord errorRecord) #VoidWrites an error record to the pipeline.
Parameters
- errorRecord System.Management.Automation.ErrorRecord
- The error record.
public Void WriteInformation(InformationRecord informationRecord) #VoidWrites an information record to the pipeline.
Parameters
- informationRecord System.Management.Automation.InformationRecord
- The information record.
public Void WriteObject(Object sendToPipeline) #VoidWrites an object to the pipeline.
Parameters
- sendToPipeline System.Object
- Object to write.
public Void WriteObject(Object sendToPipeline, Boolean enumerateCollection) #VoidWrites an object to the pipeline with optional enumeration.
Parameters
- sendToPipeline System.Object
- Object to write.
- enumerateCollection System.Boolean
- True to enumerate collections.
public Void WriteProgress(ProgressRecord progressRecord) #VoidWrites a progress record to the pipeline.
Parameters
- progressRecord System.Management.Automation.ProgressRecord
- The progress record.
public Void WriteVerbose(String text) #VoidWrites a verbose message to the pipeline.
Parameters
- message System.String
- The verbose message.
public Void WriteWarning(String text) #VoidWrites a warning message to the pipeline.
Parameters
- message System.String
- The warning message.
Properties
CancelToken #Gets the cancellation token for the cmdlet execution.
Inherited Properties
public PSEventManager Events { get; } #public PSHost Host { get; } #public CommandInvocationIntrinsics InvokeCommand { get; } #public ProviderIntrinsics InvokeProvider { get; } #public JobManager JobManager { get; } #public JobRepository JobRepository { get; } #public InvocationInfo MyInvocation { get; } #public PagingParameters PagingParameters { get; } #public String ParameterSetName { get; } #public SessionState SessionState { get; } #public ICommandRuntime CommandRuntime { get; set; } #public Boolean Stopping { get; } #public CommandOrigin CommandOrigin { get; } #