PSADT 4.0.5 - how to shrink Log filename (Long Filename because of PSAppDeployToolkit)

Hello,

How can I ensure that the module name ‘PSAppDeployToolkit’ no longer appears in the LOG FILE NAMES?
Or how can i shorten it to PSADT (eg)

greetings
Torte

In Invoke-AppDeployToolkit.ps1, right after $adtSession is defined, you can set $adtSession.LogName like this:

$adtSession = @{
    # App variables.
    AppVendor = 'SomeVendor'
    AppName = 'SomeApp'
    AppVersion = '1.2.3'
    AppArch = ''
    ...
}
$adtSession.LogName = "$($adtSession.AppVendor)_$($adtSession.AppName)_$($adtSession.AppVersion).log"

At this point you can set the log file to anything you want.

Personally, I rename Invoke-AppDeployToolkit.ps1 and use that to set the log file name automatically, like this:
$adtSession.Logname = ($MyInvocation.MyCommand.Name).Replace('.ps1','.log') #Use basename of this file to set log file name (make them match!)

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.