Not able to open Filezila through Powershell script.Control not flowing to Switch statment

`param (
[string]$CaseIdentifier
)

Write-Host "CaseIdentifier value: $CaseIdentifier"
Write-Host "Script Start"
try {
    Add-Type -Path "C:Program Files (x86)WinSCPWinSCPnet.dll"  # Update with your actual path
    Write-Host "WinSCP .NET Assembly loaded successfully."
} catch {
    Write-Host "Error loading WinSCP .NET Assembly: $_"
    exit 1
}
Import-Module -Name ImportExcel
try {
    $modulePath = (Get-Module -Name ImportExcel).Path
    Write-Host "Module path: $modulePath"

    if (-not ($modulePath)) {
        Write-Host "ImportExcel module not loaded."
        exit 1
    } else {
        Import-Module $modulePath
        Write-Host "ImportExcel module imported successfully."
    }
} catch {
    Write-Host "Error importing ImportExcel module: $_"
    exit 1
}

$excelFilePath = "srctestresourcesDatatablesWITSOnline_NNAmultivinInquiry.xlsx"
Write-Host "Excel file path: $excelFilePath"
$sheetName = "General_Data"
Write-Host "Sheet name: $sheetName"
try {
    # Read data from the Excel sheet
    $exceldata = Import-Excel -Path $excelFilePath -WorksheetName $sheetName
    Write-Host "Excel data imported successfully."
} catch {
    Write-Host "Error importing Excel data: $_"
    exit 1
}
foreach ($row in $exceldata) {
    try {
        $hostName = $row.HostName
        Write-Host "Hostname: $hostName"

        $userName = $row.UserName
        Write-Host "Username: $userName"

        $passWord = $row.Password
        Write-Host "Password: $passWord"
        $timeStamp = Get-Date -Format "yyyyMMddHHmmss"
        # Debug: Print the value of CaseIdentifier
        Write-Host "CaseIdentifier before switch: $CaseIdentifier"
        # Debug: Print the switch statement is about to execute
        Write-Host "Executing switch statement with CaseIdentifier: $CaseIdentifier"
        switch ($CaseIdentifier.Trim().ToLower()) {
            "case1" {
                Write-Host "Inside case1 block"
              #  $bodFilePath = $row.smyRNABodfilepath
               # Write-Host "smyRNABodfilepath value: $($row.smyRNABodfilepath)"
               # $remotePath = $row.ftplocationPath1
               # Write-Host "Selected case1"
            }
            "case2" {
                Write-Host "Inside case2 block"
               # $bodFilePath = $row.losAngelesBodfilepath
               # Write-Host "losAngelesBodfilepath value: $($row.losAngelesBodfilepath)"
               # $remotePath = $row.ftplocationPath2
               # Write-Host "Selected case2"
            }
            "case3" {
                Write-Host "Inside case3 block"
                $bodFilePath = $row.AguasBodfilepath
                Write-Host "AguasBodfilepath value: $($row.AguasBodfilepath)"
                $remotePath = $row.ftplocationPath3
                Write-Host "Selected case3 "
            }
            "case4" {
                Write-Host "Inside case4 block"
                $bodFilePath = $row.Aguas2Bodfilepath
                Write-Host "Aguas2Bodfilepath value: $($row.Aguas2Bodfilepath)"
                $remotePath = $row.ftplocationPath4
                Write-Host "Selected case4"
            }
            default {
                Write-Host "Invalid case identifier: $CaseIdentifier"
                exit 1
            }
        }

        # Debug: Ensure $bodFilePath and $remotePath are set
        Write-Host "BOD file path: $bodFilePath"
        Write-Host "Remote path: $remotePath"

        # Remote path where you want to upload the file
        $ftpFileLocation = $remotePath -replace '${timeStamp}', $timeStamp
        Write-Host "FTP file location: $ftpFileLocation"
    } catch {
        Write-Host "Error reading properties: $_"
        exit 1
    }
    }

    try {
        # Set up session options for FTP
        Write-Host "Setting up session options"
        $sessionOptions = New-Object WinSCP.SessionOptions -Property @{
            Protocol = [WinSCP.Protocol]::Ftp
            HostName = $hostName
            UserName = $userName
            Password = $passWord
        }

        # Create Session
        $session = New-Object WinSCP.Session

        # Connect
        Write-Host "Opening session"
        $session.Open($sessionOptions)

        # Upload file
        Write-Host "Uploading file"
        $transferOptions = New-Object WinSCP.TransferOptions
        $transferResult = $session.PutFiles($bodFilePath, $ftpFileLocation, $False, $transferOptions)

        # Check for errors
        $transferResult.Check()

        # Output a success message
        Write-Host "File uploaded successfully."
        Write-Host "Remote path: $remotePath"
        
    } catch {
        Write-Host "Error during FTP operation: $_"
    } finally {
        # Disconnect, clean up
        Write-Host "Disposing session"
        $session.Dispose()
        Write-Host "Script End"
    }

I am trying to running my powershell script to open FileZila through Java.But in powershell code i have different case statments and control is not entering into switch after read the excel sheet. not able to find out the issue. We are calling this scripts using Java.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật