Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Proper Use of Add-PWUserstoConnectedProject?
    • Sign In

    • State Verified Answer
    • +1 person also asked this people also asked this
    • Replies 2 replies
    • Subscribers 66 subscribers
    • Views 1097 views
    • Users 0 members are here

    Proper Use of Add-PWUserstoConnectedProject?

    Patrick Tran
    Offline Patrick Tran over 5 years ago

    Is there a particular way things need to be set up in order for this to work? We've begun the process of making our existing rich projects associated with connected projects.

    Get-PWUser -UserName user | Add-PWUsersToConnectedProject -FolderPath "abc"

    If I pipeline a user in I get this error:

    The input object cannot be bound to any parameters for the
    command either because the command does not take pipeline input or the input and its
    properties do not match any of the parameters that take pipeline input

    $user = get-PWUser -Username user
    Add-PWUsersToConnectedProject -FolderPath "abc" -InputUsers $user

    If I pass the user as a parameter I get this error:

    Add-PWUsersToConnectedProject : Cannot bind parameter 'InputUsers'. Cannot convert the
    "Bentley.ProjectWise.PowerShell.Common.User" value of type
    "Bentley.ProjectWise.PowerShell.Common.User" to type
    "Bentley.ProjectWise.PowerShell.Common.User"

    What am I missing? 

    • Sign in to reply
    • Cancel

    Top Replies

    • Brian Flaherty
      Offline Brian Flaherty Mon, May 21 2018 1:34 PM +1 verified
      Try using Get-PWUsersByMatch instead of Get-PWUser. This should resolve the issue.
    • Brian Flaherty
      +1 Offline Brian Flaherty Mon, May 21 2018 1:34 PM

      Try using Get-PWUsersByMatch instead of Get-PWUser.  This should resolve the issue.

      Answer Verified By: Patrick Tran 

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Patrick Tran
      0 Offline Patrick Tran Mon, May 21 2018 2:21 PM in reply to Brian Flaherty

      Thanks Brian, that worked. But Team Members are not showing up in the Connect Portal after I have added them to the project via the command.

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