Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Convert system.string to .....
    • Sign In

    • State Verified Answer
    • Replies 6 replies
    • Subscribers 66 subscribers
    • Views 2009 views
    • Users 0 members are here

    Convert system.string to .....

    Luc Poulin
    Offline Luc Poulin over 3 years ago

    Cannot convert the "riler" value of type "System.String" to type "Bentley.ProjectWise.PowerShell.Common.User"

    I get this message when I try to create this

    $Users = Get-PWUsersByMatch | select-object name

    foreach ($User in $Users) {

    Get-PWUserSettingByUser -InputUsers $($User.name) -SettingName WorkDir_WhenUsingPWExplorer

    }

    In bold I try several variation but cannot fin dteh right coding...... y next step after that is to output to excel

    • Sign in to reply
    • Cancel

    Top Replies

    • Kevin van Haaren
      Offline Kevin van Haaren Fri, Dec 6 2019 5:56 PM in reply to Luc Poulin +1 verified
      oh, it's because of the select statment when creating $users. you're stripping out all the other properties. I missed that first time $users = Get-PWUsersByMatch foreach ($user in $users) { Get-PWUserSettingByUser…
    • Luc Poulin
      0 Offline Luc Poulin Fri, Mar 6 2020 3:52 PM in reply to Kevin van Haaren

      Thank you....

      And I was hoping I was getting  my coding skills up one notch. Looks like it's more a little tiny fraction of a notch........

      Thank you again  Kevin, have a good weekend

      • 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