I have a Powershell script file called "ExecutBizTalkAppMSI.ps1" This contains a single function called "Install-BizTalkApplication". I need to execute the function on a remote server, so I use the "Invoke-Command" cmdlet as follows:
Invoke-Command -Computer $TargetServer -FilePath .\ExecuteBizTalkAppMSI.ps1 -argumentlist $MSI, $InstallFolderOnTargetServer, $Environment
Problem is, although the target script runs (I added a Write-Host directly after the Param() section), the function "Install-BizTalkApplication" is not executed.
Can anyone please let me know what I need to do to make this happen?