CUstom logging location for execute-msi function

maybe I am not reading this correctly, but the documentation looks like thi should work to force the msi install to log to a custom location:
Execute-MSI -Action Install -Path ‘MyMSI.msi’ -Parameters “/norestart /q” -private:$LogTempPath\MyMSI-$datetimestamp.log

But it still logs in the default location specified in the config file. I have also tried passing the /lvx* ‘logfile.log’ in the -parameters string to no avail. can someone help? thanks

Try

Execute-MSI -Action Install -Path "MyMSI.msi" -Parameters "/norestart /q /l*v `"$LogTempPath\MyMSI-$datetimestamp.log`""

Thanks - But I can confirm that this does not work.
snippet of code from the script:
$LogTempPath = “C:\Temp”
$datetimestamp = ( get-date -format MMddyyyy-hhmmss )
Show-InstallationProgress -StatusMessage ‘Installing Cisco AnyConnect products…’
#Install VPN Core
Show-BalloonTip -BalloonTipText ‘Install started: 1 of 5’ -BalloonTipTitle ‘AnyConnect Core Client’
Execute-MSI -Action Install -Path ‘anyconnect-win-4.9.03049-core-vpn-predeploy-k9.msi’ -Parameters "/norestart /q /l*v "$LogTempPath\anyconnect-core-$datetimestamp.log“”

The log parameter is used correctly. The only thing I would change is /q to either /qn or /passive depending on what you wanna see when it comes to progress of the installation.

Here’s official msiexec documentation: msiexec | Microsoft Docs

If you see no parameters in the log files being added then that means you didnt fill in any $app variables and so Zero Config installation kicked in and used default msi parameters from the config file.

this does not log in the custom location. we have been using command line installs for msi’s for a while, and I have tried just about every permutation of this. THe toolkit logs in its specified location, but the MSI installs do not create separate log files in the location specified in the parameters…

The toolkit log not the MSI log.