Understanding the Function Provider

The Function provider provides access to the functions defined in Windows PowerShell. By using the function provider you can obtain a listing of all the functions on your system. You can also add, modify, and delete functions. The function provider uses a file system–based model, and the cmdlets learned earlier also apply to working with functions. The commands used in the procedure are in the ListingAllFunctionsOnTheSystem.txt file.

Listing all functions on the system

  1. Open Windows PowerShell.

  2. Use the Set-Location cmdlet to change the working location to the function PSDrive. This command is shown here:

    Set-Location function:\
  3. Use the Get-ChildItem cmdlet to enumerate all the functions. Do this by using the gci

Get Microsoft® Windows PowerShell™ Step By Step 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.