Chapter 26. Creating proxy functions

A proxy function acts as a wrapper around an existing function, cmdlet, or other command. In its simplest form, a proxy function passes all parameter input through to the wrapped command. Proxy functions are commonly used to add parameters, remove parameters, or otherwise expand or restrict the underlying command, becoming a useful tool for delegated administration. For example, you might provide users with a proxy function that removes a command parameter that you don’t want the user to have access to. When loaded, a proxy function somewhat hides the real, wrapped command. Combined with techniques like constrained remoting endpoints (which we cover in the next chapter), proxy functions can completely hide ...

Get Learn PowerShell Toolmaking in a Month of Lunches now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.