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
    Parents
    • Miroslav Matas
      0 Offline Miroslav Matas Tue, Sep 3 2019 2:21 AM

      Add-PWUserToGroup -GroupName "09Cont_Improvement" -UserName "miroslav.matas"

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Devendra Wagh
      0 Offline Devendra Wagh Mon, Nov 15 2021 8:04 AM in reply to Miroslav Matas

      Miroslav, 

      If I wanted to add multiple users to projectwise using powershell, let say using excel\CSV file, do we have a code\cmdlet for that ? 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Devendra Wagh
      0 Offline Devendra Wagh Mon, Nov 15 2021 8:04 AM in reply to Miroslav Matas

      Miroslav, 

      If I wanted to add multiple users to projectwise using powershell, let say using excel\CSV file, do we have a code\cmdlet for that ? 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Brian Flaherty
      0 Offline Brian Flaherty Mon, Nov 15 2021 10:21 AM in reply to Devendra Wagh

      You could import the data from you excel/csv file and loop through each entry adding the user to a group/userlist. 

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