# How to best work around spaces in path to PowerShell directory

**URL:** <https://forums.powershell.org/t/how-to-best-work-around-spaces-in-path-to-powershell-directory/14683>\
**Category:** PowerShell Help\
**Created:** [July 19, 2020, 4:40am UTC](https://forums.powershell.org/t/how-to-best-work-around-spaces-in-path-to-powershell-directory/14683 "2020-07-19T04:40:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbearfreddy](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@bigbearfreddy](https://forums.powershell.org/u/bigbearfreddy)\
**Post date:** [July 19, 2020, 4:40am UTC](https://forums.powershell.org/t/how-to-best-work-around-spaces-in-path-to-powershell-directory/14683/1 "2020-07-19T04:40:26Z")

</div>

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&lt;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

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [July 19, 2020, 8:32am UTC](https://forums.powershell.org/t/how-to-best-work-around-spaces-in-path-to-powershell-directory/14683/2 "2020-07-19T08:32:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [July 19, 2020, 8:32am UTC](https://forums.powershell.org/t/how-to-best-work-around-spaces-in-path-to-powershell-directory/14683/3 "2020-07-19T08:32:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/how-to-best-work-around-spaces-in-path-to-powershell-directory/14683/4 "2024-05-16T20:29:13Z")

</div>


