Write-Log and Exit-Script errors when running Deploy-Application.ps1

Topics: Archive - General
Apr 24, 2014 at 2:03 AM
I'm receiving the following errors when I run a test Java deploy script I'm working on. Any thoughts?


PS C:\temp\toolkit> .\Deploy-Application.ps1
Write-Log : The term 'Write-Log' 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 C:\temp\toolkit\Deploy-Application.ps1:122 char:87
  • ... tackTrace)`)"; Write-Log "$exceptionMessage"; Show-DialogBox -Text $exceptionMes ...
  • ~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Write-Log:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Exit-Script : The term 'Exit-Script' 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 C:\temp\toolkit\Deploy-Application.ps1:123 char:1
  • Exit-Script -ExitCode 0 # Otherwise call the Exit-Script function to perform fin ...
  • ~~~~~~~~~~~
    • CategoryInfo : ObjectNotFound: (Exit-Script:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Coordinator
Apr 29, 2014 at 12:54 PM
This would generally indicate that you've got a typo in the Deploy-Application.ps1 somewhere above where AppDeployToolkitMain.ps1 is loaded. A good text editor like Notepad2 will give you syntax highlighting and might be able to quickly point you to the problem.

Cheers, Dan
May 30, 2014 at 8:19 PM
I had this happen to me today. Try and copy out the part (line 73 in the default Deploy-Application.ps1) and run it standalone. It should give you a more specific error. Mine was with the banner being incorrect, and that was the issue.