Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Set-PWUserWorkingDirectory bug
    • Sign In

    • State Not Answered
    • Replies 2 replies
    • Subscribers 66 subscribers
    • Views 1083 views
    • Users 0 members are here

    Set-PWUserWorkingDirectory bug

    Kevin van Haaren
    Offline Kevin van Haaren over 6 years ago

    Set-PWUserWorkingDirectory actually checks if the working directory you're setting for the user exists on the local machine.

    If I'm changing a working directory for another user, the directory I'm changing it to NEVER exists on the local machine. I probably don't even have the drive letter they're wanting to use on my machine.

    • Sign in to reply
    • Cancel
    • Arturas Zidonis
      0 Offline Arturas Zidonis Wed, Oct 25 2017 8:02 AM in reply to Kevin van Haaren

      I think that cmdlet is not working the way it could. I've informed PW powershell development team suggesting to not create the folders when setting working directory. 

         
      This is a test

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Thu, Oct 5 2017 12:36 PM

      BTW, if you run into this the work around is to use command line to do a SUBST of an existing drive to the drive letter they use, then in PowerShell use Test-Path to verify the directory exists, and New-Item to create the directory if it doesn't exist.

       

      • 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