This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM. Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.198
OS: Windows 10 Pro (64 Bit)
Build: v10.0.19043.0
Hi,
Not sure if I'm doing something wrong or if it's a limitation of Powershell Studio but i have noticed if i use dot sourcing from my local drive the PS Studio Intellisense recognises Functions and Parameters from the sourced file.
If however, I host that file I'm dot sourcing on a network share and access it via UNC (\\Server_Name\Share\File.ps1) then the Functions/Parameters don't get recognised in the PS Editor, the functions remain grey and it doesn't provide the tab completion.
It does still work when i run the script, i just don't get the helpful syntax highlighting and auto completion.
I thought maybe dot sourcing in general doesn't like UNC paths but when doing it in the PS terminal or PS ISE it works and auto-completes fine.
Is it possible for the PS Studio to work with UNC paths?
Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.199
OS: Windows 10 Pro (64 Bit)
Build: v10.0.19043.0
The reported issue is still present in this version too.
I didn't expect it to be fixed as nothing has been mentioned on this thread or in the update changelog but just wanted to update you.
From my initial tests, I have not found any issues when dot sourcing a network file with a UNC path:
SPS_DotSourceUNC.png (40.75 KiB) Viewed 4758 times
PowerShell Studio is a .NET application, but the component running scripts is not. If it is a .NET issue, then it is most likely either a permission issue or the request timed out with the file on your network share.
Can you try running PowerShell Studio as an administrator?
I have just tried running as Administrator but that hasn't helped.
When I dot source from c:\users\... it works fine and I see the Functions pane populate with the functions from my file.
That doesn't happen from \\my-server\my-share\...
I also tried changing the path to my local drive from c:\users\... to \\my-pc-name\c$\users\... and this also doesn't work.
I did test mapping a network location to a drive letter but that didn't work either so maybe it's not related to UNC per se but rather any network location?
This topic is 2 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.