Help Needed with Automatic MSSQL Installation

Hello, i am new in Powershell  and i hope someone can help me. I try to install with Powershell the MSSQL 2014, so far i can Start a silent Installation from MSSQL from a specific path or a GUI Installation after Booting a ISO, but what i want to do is, boot up the ISO and start the Silent Installation.

Those are the Scripts i have so far:

Silent Install with a specific path:

P:\Setup.exe /QS /ConfigurationFile="C:\temp\ConfigurationFile.INI"

Diskmount and normal Setup but no silent install:

mount-diskimage -imagepath C:\iso\SQL2014.iso
$Laufwerk = (get-diskimage C:\iso\SQL2014.iso | Get-Volume).DriveLetter
$Setup = $Laufwerk + ":\Setup.exe"
start-process "$Setup" -wait
dismount-diskimage -imagepath C:\iso\SQL2014.iso

 

My Problem now: Both scripts are working fine separately, but when i try to add the ConfigurationFile Part from the first one in the second Script, the script wont work anymore.

I Already tried to set the Driveletter, but so far no luck. 

Maybe someone here have an idea and can help me ?


Best regards

Stefan