4.1.5 Change syntax $($adtSession.DirFiles) - general question

I'm now constantly implementing controls and have always found a solution so far, but maybe there's an answer I can understand.

I've often noticed that certain syntax changes with each version, or certain things have become more restrictive, meaning you have to catch all possible values.

Sometimes you have to work with apostrophes (none, single, double), combining them differently, because the "normal" Powershell syntax doesn't accept them.

Certain basic Powershell functions no longer work because the path for the PSADT function must be clear.
$MyINSTPATH ​​= Split-Path -parent $MyInvocation.MyCommand.Definition
Write-ADTLogEntry -Message '$MyINSTPATH'

Change Syntax
vor 4.1.5
$MyScript="$($adtSession.DirFiles)\DE\response.varfile"

bei 4.1.5
$MyKeyFile=$($adtSession.DirFiles)+'\SOS712099E.xcvault'
need +'File'

V3
Execute-MSI -Path EditorV9.x64.msi -Action Install -AddParameters "EDITOR_LANGUAGE=de-DE NOUPDATER=1 SET_AS_DEFAULT=1 KEYFILE=`"$MyKeyFile`"" -Transform EditorV9.x64.mst

`" is not displayed cleanly

V4.1.5

[string]$MyArgumentListDE='SET_AS_DEFAULT=0 SET_LITE_AS_DEFAULT=0 VIEW_IN_BROWSERS=0 DESKTOP_SHORTCUTS=0 APP_LANG=de-CH NOUPDATER=1 SCHEDULEUPDATER=0'

    Write-ADTLogEntry -Message "================ Check Key ================ "
    $MyKeyFile=$($adtSession.DirFiles)+'\SOS712099E.xcvault'
    Write-ADTLogEntry -Message $($adtSession.DirFiles)
    Write-ADTLogEntry -Message $MyKeyFile
    Write-ADTLogEntry -Message "================ Check Key ================ "
	
	    $languages = @{
        "de" = @{
            LogMsg      = "Installation nur Deutsch"
            Transform   = $MyMSITransformFile
            # Argument    = $MyArgumentListDE
            Argument    = $MyArgumentListDE +' KEYFILE="'+ $MyKeyFile +'"'
        }
        "fr" = @{
            LogMsg      = "Installation nur Französisch"
            Transform   = $MyMSITransformFile
            Argument    = $MyArgumentListFR +' KEYFILE="'+ $MyKeyFile +'"'
        }
    }
	
    foreach ($lang in $languages.Keys) {
        if ($currentLang -like "$lang*") {
            Write-ADTLogEntry -Message $languages[$lang].LogMsg
            Write-ADTLogEntry -Message "================ Check MyArgumentList ================ "
            Write-ADTLogEntry -Message $languages[$lang].Argument
            Write-ADTLogEntry -Message "================ Check MyArgumentList ================ "
            Start-ADTMsiProcess -Action 'Install' -FilePath $MyMSIFile -Transforms $languages[$lang].Transform -AdditionalArgumentList $languages[$lang].Argument
        }
    }