Product, version and build: 4.5.149
(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: x64
Operating system: Windows 10 1607
32 or 64 bit OS: x64
PowerShell Version: 5.1.14393.1066
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Hello,
I'm not sure what I did, but any script I to try to run in Powershell Studio from the script editor the output says "The term '%scriptfullname% is not recognized as the name of a cmdlet, function, script file, or operable program..." and says "ObjectNotFound: (%Scriptfullname%) [], CommandNotFoundException". Un/Reinstalling Powershell Studio, that didn't fix it. I do not have this problem in Powershell ISE. Does anyone have any ideas how I can fix this? Thanks in advance!
Unable to run any script files from the script pane
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.
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.
Re: Unable to run any script files from the script pane
I don't believe I have seen this before. If you can, please answer the following question:
1. What platform settings are you uses? PowerShell V5 or V2? STA Mode? 64 Bit or 32 bit? etc.
2. If you create a new ps1 script with the following command, do you still get the error?
3. Do you get the error if you use Run selection?
4. Does the error include a line number?
Thank you,
1. What platform settings are you uses? PowerShell V5 or V2? STA Mode? 64 Bit or 32 bit? etc.
2. If you create a new ps1 script with the following command, do you still get the error?
- Write-Host 'Hello World'
4. Does the error include a line number?
Thank you,
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Unable to run any script files from the script pane
Thank you for the response! Great minds think a like... I previously created a script file called "Hello-World.ps1" and the only line in the file is "Write-Host "Hello World!"". Here is the output:
>> Running (Hello-World1.ps1) Script...
>> Platform: V5 64Bit (STA)
ERROR: C:\Temp\Hello-World1.ps1 : The term 'C:\Temp\Hello-World1.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
ERROR: the spelling of the name, or if a path was included, verify that the path is correct and try again.
line (1, 1): ERROR: At Line: 1 char: 1
ERROR: + C:\Temp\Hello-World1.ps1
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : ObjectNotFound: (C:\Temp\Hello-World1.ps1:String) [], CommandNotFoundException
ERROR: + FullyQualifiedErrorId : CommandNotFoundException
ERROR:
>> Execution time: < 1 second
>> Script Ended
Any Thoughts? I'm sure it's something dumb I did on accident...
>> Running (Hello-World1.ps1) Script...
>> Platform: V5 64Bit (STA)
ERROR: C:\Temp\Hello-World1.ps1 : The term 'C:\Temp\Hello-World1.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
ERROR: the spelling of the name, or if a path was included, verify that the path is correct and try again.
line (1, 1): ERROR: At Line: 1 char: 1
ERROR: + C:\Temp\Hello-World1.ps1
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : ObjectNotFound: (C:\Temp\Hello-World1.ps1:String) [], CommandNotFoundException
ERROR: + FullyQualifiedErrorId : CommandNotFoundException
ERROR:
>> Execution time: < 1 second
>> Script Ended
Any Thoughts? I'm sure it's something dumb I did on accident...
Re: Unable to run any script files from the script pane
Can you try running the same script using PrimalScript? This will let us know if the issue is within the PowerShell Studio UI or the engine itself.
You can download a trial from the product page:
https://www.sapien.com/software/primalscript
In addition, have you tested this on a different machine within your network?
You can download a trial from the product page:
https://www.sapien.com/software/primalscript
In addition, have you tested this on a different machine within your network?
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Re: Unable to run any script files from the script pane
Have you checked your local execution policy or that set by group policy?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Unable to run any script files from the script pane
Thank you for the replies, I have figured out the culprit. The execution policy set by Group Policy got me thinking and, as expected, it was completely self-inflicted. We have an AppLocker GPO linked that only included the default rules for running scripts (allow anything ran from Program Files, allow anything ran from Windows, and allow Admins to run anything from anywhere)... which was blocking my script execution from C:\Temp.
Thanks again for the help!
Thanks again for the help!
Re: Unable to run any script files from the script pane
Thank you for the update.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.