This project is read-only.

Write-log error with version 3.1.5

Topics: Archive - Deployment Scripts
Aug 19, 2014 at 4:14 PM
Hello,

I updated my deployment script from version 3.1.3 to version 3.1.5. The only lines I modifed were the Installation/Uninstallation and application variables but now it throws the following error. If I use AppDeployToolkitMain.ps1 ver 3.1.3 the script works fine.

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\NextGen.Authoring.PROD_Bank.of.America_201.42.10402_001\Deploy-Application.ps1:127 char:96
  • } } Catch { $exceptionMessage = "$($_.Exception.Message) ($($_.ScriptStackTrace))"; Write-Log <<<< "$exceptionMessage"; Show-DialogBox -Text $exceptionMessage -Icon
    "Stop"; Exit-Script -ExitCode 1 } # Catch any errors in this script
    • CategoryInfo : ObjectNotFound: (Write-Log:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
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, v
erify that the path is correct and try again.
At C:\temp\NextGen.Authoring.PROD_Bank.of.America_201.42.10402_001\Deploy-Application.ps1:128 char:12
  • Exit-Script <<<< -ExitCode 0 # Otherwise call the Exit-Script function to perform final cleanup operations
    • CategoryInfo : ObjectNotFound: (Exit-Script:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Aug 19, 2014 at 11:05 PM
That error suggests the main toolkit file has not dot-sourced. Please check the files in the AppDeployToolkit directory.
Aug 21, 2014 at 6:05 PM
Edited Aug 21, 2014 at 6:06 PM
I figured out the problem. I had to also update the AppDeployToolkitConfig.xml file with our standard log locations. This resolved the write-log issue.