Exclude web.config from FTP sync to preserve server settings

This commit is contained in:
2026-02-02 17:29:24 +01:00
parent 323be48c02
commit 85705628f2

View File

@@ -12,7 +12,7 @@ $WinScpPath = "C:\\Users\\frank\\AppData\\Local\\Programs\\WinSCP\\WinSCP.com
$RecycleAppPool = $true
$AppPoolName = "xTr1m.com(domain)(4.0)(pool)"
$WinRmComputer = "xTr1m.com"
$WinRmCredentialUser = "win-eisvr3h3qra\\Administrator"
$WinRmCredentialUser = "Administrator"
$WinRmCredentialPass = $null # prompted at runtime
$UseWinRmHttps = $true # set false if using HTTP + TrustedHosts
@@ -100,7 +100,7 @@ option confirm off
open ftp://$($FtpUser):$($FtpPassword.Replace('`n','').Replace('`r',''))@$FtpHost
lcd $PublishDir
cd $RemoteDir
synchronize remote . -delete
synchronize remote . -delete -filemask="|web.config"
exit
"@ | Set-Content -Path $tempScript -Encoding UTF8