Search found 3 matches

by dcarlson
Mon Feb 15, 2021 3:29 pm
Forum: PowerShell
Topic: Script Cannot Find Called Script
Replies: 7
Views: 3726

Re: Script Cannot Find Called Script

I am the literal dumbest person alive.

I forgot a hyphen in one of my parameters that is used in my variable to the path to the script. I am so sorry for wasting everyone's time!

But, I'll definitely take the advice given here and modify how I'm calling these scripts going forward. Thanks so much!
by dcarlson
Mon Feb 15, 2021 12:58 pm
Forum: PowerShell
Topic: Script Cannot Find Called Script
Replies: 7
Views: 3726

Re: Script Cannot Find Called Script

I'm sorry I wasn't very clear on why I'm running my commands with ampersand (&). I'm using this currently because most of the time, the path to the script being called is typically stored in a variable. So in reality it'd be something more like: $result = &"$pathToScript\CALLEDSCRIPT.ps1" -Variable1...
by dcarlson
Fri Feb 12, 2021 3:41 pm
Forum: PowerShell
Topic: Script Cannot Find Called Script
Replies: 7
Views: 3726

Script Cannot Find Called Script

Hello Everyone, I've got a script that I've been working with that is having a strange issue, and it appears to be specific to Powershell Studio. When I try to run the script in Studio, it fails on the following line: $result = &"\\SERVER\PATH TO SCRIPT\CALLEDSCRIPT.ps1" -Variable1 $var1 -Variable2 ...