Functions/Invoke-RecalcDeployment.ps1
function Invoke-RecalcDeployment { [cmdletbinding()] param ( [Parameter(Mandatory = $true)] [string]$Citrix, [Parameter(Mandatory = $false)] [string]$AppExe = "Recalc.exe", [Parameter(Mandatory = $false)] [System.IO.FileInfo]$TestDestinationFolder = "\\denu1s300\PH-CLIENT-FMO$\Recalc_BMS\TEST", [Parameter(Mandatory = $false)] [System.IO.FileInfo]$AccDestinationFolder = "\\denu1s300\PH-CLIENT-FMO$\Recalc_BMS\ACC", [Parameter(Mandatory = $false)] [System.IO.FileInfo]$ProdDestinationFolder = "\\denu1s300\PH-CLIENT-FMO$\Recalc_BMS\PROD", [Parameter(Mandatory = $false)] [System.IO.FileInfo]$DeploymentLogFolder = "\\rssi05ms0006\data$\Unit-IT\Recalc\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 } |