public void StartPowershellScript()
        {
            MsSqlCreationParameters parameters = new MsSqlCreationParameters
            {
                PathToScript        = @"C:\Users\Sven\Documents\local-git-repos\SqlBackup\SqlBackup\run_sqlexpress_docker.ps1",
                HttpLinkToDbMdfFile = "https://goo.gl/8CFlLQ",
                SuAdminPasswort     = "XX5S4a5DpvDlWkY*zZl*",
                HostPort            = "6999",
                PathToMdfFile       = @"C:\Users\Sven\Documents\local-git-repos\SqlBackup\SqlBackup",
                NameOfDatabaseFile  = "AdventureWorks2012_Data.mdf",
                DbName = "AdventureWorks2012_Data"
            };
            MsSqlPowershellRunner psRunner = new MsSqlPowershellRunner();

            psRunner.RunMsSqlExpressServer(parameters);
        }
        public string RunMsSqlExpressServer(MsSqlCreationParameters parameters)
        {
            using (var powerShellScript = PowerShell.Create())
            {
                powerShellScript.Commands.AddScript(parameters.ScriptContents);

                powerShellScript.Commands.AddArgument(parameters.HttpLinkToDbMdfFile);
                powerShellScript.Commands.AddArgument(parameters.NameOfDatabaseFile);
                powerShellScript.Commands.AddArgument(parameters.DoubleSlashPathToMdfFile);
                powerShellScript.Commands.AddArgument(parameters.PathToMdfFile);
                powerShellScript.Commands.AddArgument(parameters.SuAdminPasswort);
                powerShellScript.Commands.AddArgument(parameters.HostPort);
                powerShellScript.Commands.AddArgument(parameters.DbName);

                var output = powerShellScript.Invoke();
                ContainerGuid = output.FirstOrDefault()?.ImmediateBaseObject as string;
            }
            return(ContainerGuid);
        }