How to best work around spaces in path to PowerShell directory

Welcome Forums General PowerShell Q&A How to best work around spaces in path to PowerShell directory

Viewing 2 reply threads
  • Author
    Posts
    • #243497
      Participant
      Topics: 1
      Replies: 0
      Points: 32
      Rank: Member

      Hi,

      Relatively newbie here (some experience with PS).

      With PowerShell storing it’s profile in the Documents\PowerShell or Documents\WindowsPowerShell AND
      my company redirecting the Documents folder to OneDrive for Business
      I end up with a spaces in my path to those folders;

      C:\Users\<User>\OneDrive – <Company>\Documenten\PowerShell\

      This seems to present all kinds of issues trying to run .ps1 files from that folder.
      Any recommendations on how to best handle this situation ?

      Thanks

    • #243521
      Senior Moderator
      Topics: 9
      Replies: 1311
      Points: 4,794
      Helping Hand
      Rank: Community Hero

      ahh, interesting scenario. So I think you are getting error in loading the profile during the launch of PowerShell , is it ?

    • #243524
      Senior Moderator
      Topics: 9
      Replies: 1311
      Points: 4,794
      Helping Hand
      Rank: Community Hero

      ahh, interesting scenario. So I think you are getting error in loading the profile during the launch of PowerShell , is it ?

Viewing 2 reply threads
  • You must be logged in to reply to this topic.