Functions/Invoke-Ura10Deployment.ps1

function Invoke-Ura10Deployment {
    [cmdletbinding()]
    param (
        [Parameter(Mandatory = $true)]
        [string]$Citrix,
        [Parameter(Mandatory = $false)]
        [string]$AppExe = "Ura.exe",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$TestDestinationFolder = "\\denu1s300\PH-CLIENT-FMO$\URA10_BMS\TEST",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$AccDestinationFolder = "\\denu1s300\PH-CLIENT-FMO$\URA10_BMS\ACC",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$ProdDestinationFolder = "\\denu1s300\PH-CLIENT-FMO$\URA10_BMS\PROD",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$SibDestinationFolder = "\\sbcfile01\bms$\URA-Templates\TRANSLATE\BMS\URA10",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$TestRootDeploymentFolder = "\\rssi05ms0006\data$\Ura10\Files\TEST",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$AccRootDeploymentFolder = "\\rssi05ms0006\data$\Ura10\Files\ACC",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$ProdRootDeploymentFolder = "\\rssi05ms0006\data$\Ura10\Files\PROD",
        [Parameter(Mandatory = $false)]
        [System.IO.FileInfo]$DeploymentLogFolder = "\\rssi05ms0006\data$\Ura10\Deployment Log"
    )

    switch ($Citrix) {
        "TEST" {
            $DestinationFolder = $TestDestinationFolder

        }
        "ACC" {
            $DestinationFolder = $AccDestinationFolder
        }
        "PROD" {
            $DestinationFolder = $ProdDestinationFolder
        }
    }

    $Export = [pscustomobject]@{
        DestinationFolder   = $DestinationFolder
        AppExe              = $AppExe
        DeploymentLogFolder = $DeploymentLogFolder
    }

    return $Export
    #Remove-Variable SourceFolder, App, TEST, ACC, PROD, AppExe, FolderBrowser, Check, Verzija, DeploymentShowParams, MsgBox -ErrorAction SilentlyContinue
}