First, some clarification of terms. By finalize, I don\'t mean closing a session; I mean writing a lead-out to a CD or DVD in such a way that information c
Set the ForceMediaToBeClosed flag on the IMAPI2.MsftDiscFormat2Data object and write out the disc with the close flag enabled.
Approach is described here: https://social.msdn.microsoft.com/Forums/en-US/ce1ff136-39a1-4442-bc5c-61c119b6f4f2/finalize-question?forum=windowsopticalplatform#2e968a94-7347-4d94-9332-00fe7cd0ba89
Below is a link to a nice Powershell burning script, all you'd have to do is update Out-CD with a new param to set $DiscFormatData.ForceMediaToBeClosed = true when you are ready for your closing write.
Link: https://www.adamtheautomator.com/use-powershell-to-automate-burning-cds/
FYI:
# this fetches all the properties (as you probably already know)
$DiscFormatData = New-Object -com IMAPI2.MsftDiscFormat2Data ;
$DiscFormatData | Get-Member ;