Get-ChildItem not working in Debugger

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
davestiff
Posts: 5
Joined: Tue Dec 06, 2016 7:01 am

Get-ChildItem not working in Debugger

Post by davestiff » Tue Dec 06, 2016 7:15 am

Product, version and build: PowerShell Studio 2016 5.3.131
(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: 64
Operating system: Windows 8.1
32 or 64 bit OS: 64

Hello,

our DevOps Team is evaluating PowerShell Studio 2016 for our needs. So far it has been going well.

I have come across a problem debugging a script though. This line does not appear to be executing:

$FileList = Get-ChildItem -Path FileSystem::"$networkBinFolder\*" -Recurse -Include "*.dll","*.exe" -Exclude "*fakes*","*test*","*installer*"

$FileList is blank after the line executes. If I use "Run Selection in Console" it works correctly. ($networkBinFolder is a UNC share)

Any ideas on this?

Thanks!
Dave

User avatar
Alexander Riedel
Posts: 7051
Joined: Tue May 29, 2007 4:43 pm

Re: Get-ChildItem not working in Debugger

Post by Alexander Riedel » Tue Dec 06, 2016 10:56 am

Usually a permission issue. The console or ISE run elevated by default.
Make sure the user who runs the script has access to the share.
If a login happens in the profile, note that profiles are not executed when running a script from PowerShell Studio to avoid dependencies.
Does Powershell output a specific error message?
Alexander Riedel
SAPIEN Technologies, Inc.