Search code examples
powershellexecution

Out-FINcodedCommand.ps1 is not recognized - executing a script in the current directory


I have seen this script https://github.com/danielbohannon/Out-FINcodedCommand/blob/master/README.md

And when I try the the example given I get the error

Out-FINcodedCommand.ps1 : The term 'Out-FINcodedCommand.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
Out-FINcodedCommand.ps1 -command "iex (iwr https://github.com/danielb ...
CategoryInfo : ObjectNotFound: (Out-FINcodedCommand.ps1:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException

Can you help?


Solution

  • Where are you running it. Add .\ in front of it

    .\Out-FINcodedCommand.ps1
    

    If it is in a directory that you are not cd to, then the .\ needs to be in front of the whole string

    .\Downloads\Out-FINcodedCommand-master\Out-FINcodedCommand-master\Out-FINcodedCommand.ps1