3 ms·
Where have you seen this? If the function does it properly (SupportsShouldProcess) then it should pass down automatically.
by jcotton42 3y ago
Where have you seen this? If the function does it properly (SupportsShouldProcess) then it should pass down automatically.
- partdavid 3y agoI have seen it, I think it's because it's not easy to see whether the cmdlets or functions your calling support and support it right. It does work, but I have seen it not always work and that results in having to check or test every command. I think the GP is overstating the incovenience, though, and Powershell is still much, much better than any Unix shell in this respect (which simply has no mechanism and no standard way to discover one).
- snuxoll 3y agoI have written just in the last month cmdlets that have SupportsShouldProcess, and it does not pass on as it should. See https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-shouldprocess?view=powershell-7.4#scope-issues https://learn.microsoft.com/en-us/powershell/scripting/learn... and https://github.com/PowerShell/PowerShell-RFC/pull/221#issuecomment-592954839 https://github.com/PowerShell/PowerShell-RFC/pull/221#issuec...
- jcotton42 3y agoOh yikes!