You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
write-HostItemDecorator can easily be turned into a script block obviating the need for the wrapper object. I discovered this as a result of perusing as issue on PSScriptAnalyzer (PowerShell/PSScriptAnalyzer#711 (comment)); a comment by @rjmholt illustrates how to do this:
We can use this technique for passing write-HostItemDecorator as a parameter to invoke-ForeachFile, without powershell mistaing it for in an place invocation of the function.
The text was updated successfully, but these errors were encountered:
write-HostItemDecorator can easily be turned into a script block obviating the need for the wrapper object. I discovered this as a result of perusing as issue on PSScriptAnalyzer (PowerShell/PSScriptAnalyzer#711 (comment)); a comment by @rjmholt illustrates how to do this:
We can use this technique for passing write-HostItemDecorator as a parameter to invoke-ForeachFile, without powershell mistaing it for in an place invocation of the function.
The text was updated successfully, but these errors were encountered: