ICommandRuntime.ShouldProcess Method (String)
Assembly: System.Management.Automation (in System.Management.Automation.dll)
The name of the resource to be changed.
Return ValueA Boolean value that indicates true if the user wants the cmdlet to continue; false indicates not to 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.