When I run the script outside of the Octopus deployment process everything is fine. However, when I run the same script via the library inside Octopus, it says it can’t find term ‘Skip’. It says it isn’t a recognized cmdlet, function, script file, or operable program. What do I need to do to have Octopus make the Powershell Community Extensions available to the script library?
Thanks for reaching out. The scripts get executed on the tentacles. Have you checked if PCEX is installed on the tentacles? Running a tiny get-childitem script on the tentacles (from octopus) to check for the PCEX files might be a good idea.
Actually, I’m still evaluating Octopus. So, in my limited testing environment the tentacle is on the same machine as the Octopus server. I’ve run the script successfully on the same machine, but outside Octopus. It seems like I need to reference PCEX somehow in my script, but I’m not sure how.
OK, I figured it out. I needed to add “C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx” to the environment variable and them put “Import-Module pscx;” in the script. Thanks!