Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum How to add users to a group using PW PowerShell
    • Sign In

    • State Suggested Answer
    • Replies 6 replies
    • Answers 1 answer
    • Subscribers 68 subscribers
    • Views 1955 views
    • Users 0 members are here
    • PWPowerShell

    How to add users to a group using PW PowerShell

    Juan Garcia
    Offline Juan Garcia over 4 years ago

    can i have a sample on how to add users to a group using PW PowerShell?

    i have an empty group in in PW Administrator called "09Cont_Improvement" i need to add 150 users to this group

    is there a cmlet to add users to this group in a easy way?

    Thanks

    • Sign in to reply
    • Cancel

    Top Replies

    • Miroslav Matas
      Offline Miroslav Matas Tue, Sep 3 2019 2:21 AM +1
      Add-PWUserToGroup -GroupName "09Cont_Improvement" -UserName "miroslav.matas"
    • Brian Flaherty
      Offline Brian Flaherty Thu, Sep 5 2019 11:49 AM in reply to Juan Garcia +1
      Get-Help New-PWLogin -Full
    • Aniruddh Chavan
      0 Offline Aniruddh Chavan Thu, Nov 18 2021 12:47 AM in reply to Devendra Wagh

      if you can put each email id in text file, one per line [without blank spaces] you can do:

      cls
      
      New-PWLogin -UseGui -Verbose
      
      $Users = Get-Content -Path 'path/to/file/users.txt'
      
      Get-PWUsersByMatch -Email $Users | Add-PWUserToGroup -GroupName 'Group Name' -Verbose
      
      Undo-PWLogin -Verbose

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • 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