ICommandRuntime.ShouldProcess Method (String, String)
Assembly: System.Management.Automation (in System.Management.Automation.dll)
The name of the resource the cmdlet wants to change.
The action the cmdlet wants to perform.
Return ValueA Boolean value that indicates true if the user wants the cmdlet to continue; false indicates that the cmdlet should not continue.
Cmdlets call ShouldProcess before the cmdlet makes a change to the system, such as deleting files or stopping services.
The implementation of this method should take into account command-line settings and preference variables in determining whether it should prompt the user and what it should return.
Target PlatformsWindows Developer Preview, Windows Server Developer Preview
Send comments about this topic to Microsoft.