Function Navigator

When scripts contain a large number of functions, the Function Navigator helps quickly navigate to a given function.

Enabling and Disabling Function Navigator

To enable or disable the Function Navigator, click the Navigator button, or press ALT+N.

Toggle Navigation Bar

The Function Navigator is located on top of each editor pane, and shares the space with the RealTimeSearch box.

Navigation Bar

Navigating to Function

To navigate to a function in your script, click anywhere inside the Function Navigator. A combo box opens and displays the functions. Click the function you want to navigate to.

The Function Navigator not only lists the function names:

  • Nested Functions: if a function is nested inside another function, or defined inside a script block, the nesting path is appended to the function name.
  • Functions, Filters, Workflows, DSC Configurations: the Function Navigator lists not just functions, but also similar constructs such as Filters, Workflows, or DSC configurations. Each type shows its own unique icon. Functions defined inside a scriptblock show a dimmed icon.

Function Navigator

RealTime Update

The Function Navigator is updated in real-time based on the current caret position.

If the caret is inside a function, the Function Navigator automatically shows the function name. If the caret is not inside a function, the Function Navigator shows “(main)”. And if there are no functions inside a script, the Function Navigator displays “no functions in script”.

Navigating to Top of Function

To navigate to the top of the function the caret is currently in, click the Function Navigator, and click the selected function.