Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Advanced PowerShell Functions: Begin to Process to End
    • Sign In

    • Replies 1 reply
    • Subscribers 65 subscribers
    • Views 423 views
    • Users 0 members are here
    • powershell
    • pwps_dab
    • ProjectWise Programming
    • ProjectWise PowerShell Modules

    Advanced PowerShell Functions: Begin to Process to End

    Adrian Crowfoot
    Offline Adrian Crowfoot over 3 years ago

    All - I found a good article explaining when to use Begin, Process and End for functions:


    Advanced PowerShell Functions: Begin to Process to End

    Hopefully you find it useful.

    • Sign in to reply
    • Cancel
    • Dan Williams
      Offline Dan Williams Fri, Nov 22 2019 1:52 PM

      Adrian, good point. 

      For scripts that are run often and with large amounts of repetitive actions, you definitely can save processing time by taking advantage of these constructs.

      FWIW, for some helpful examples delivered with PWPS_DAB, take a look at the HelperFunctions.psm1 file typically delivered here:  C:\Program Files\WindowsPowerShell\Modules\pwps_dab\x.x.x.x\

      There are similar constructs in the organization of the code behind Cmdlets which also can make processing of multiple objects much more efficient.

      Thanks again for the tip as I suspect not everyone who is creating PW scripts are aware of this PowerShell feature.

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies