Issues with Invoke-Command während der Installation von Software auf einem entfernten Server

Ich muss eine Anwendung auf mehreren Remote-Servern im stillen Modus installieren. Ich habe ein Skript (Installer.ps1) wie unten mit Powershell v3.0 erstellt:

param(
[String] $ServerNameFilePath = $(throw "Provide the path of text file which contains the server names"),
[String] $InstallerFolderPath = $(throw "Provide the Installer Folder Path. This should be a network location"),
[String] $UserName = $(throw "Provide the User Name"),
[String] $Password= $(throw "Provide the Password")
)
Function InstallApp
{
    $secpasswd = ConvertTo-SecureString $Password -AsPlainText -Force
    $mycreds = New-Object System.Management.Automation.PSCredential ($UserName, $secpasswd)

    $ScrBlock = {param($InstallerFolderPath) $ExePath = Join-Path $InstallerFolderPath "ServerReleaseManager.exe";  & $ExePath /q;}
    Invoke-Command -ComputerName (Get-Content Servers.txt) -Credential $mycreds $ScrBlock -ArgumentList $InstallerFolderPath

}

InstallApp -ServerNameFilePath $ServerNameFilePath -InstallerFolderPath $InstallerFolderPath -UserName $UserName -Password $Password

Dann rufe ich das Skript wie folgt auf (der Pfad des Installationsordners kann Leerzeichen enthalten und die ausführbare Datei ServerReleaseManager.exe akzeptiert Argumente):

.\Installer.ps1 -ServerNameFilePath Servers.txt -InstallerFolderPath "\\TestServer01\Public\Stable Applications\Server Release Manager Update 2\2.7" -UserName "Domain\User" -Password "Test123"

Ich komme unterCommandNotFoundException immer

The term '\\TestServer01\Public\Stable Applications\Server Release Manager Update 2\2.7\ServerReleaseManager.exe' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Ich habe andere Optionen ausprobiert, wie zum Beispiel -FilePath mitInvoke-Command aber gleicher Fehler. Ich bin hier wirklich blockiert. Können Sie mir bitte mitteilen, warum dieser Fehler aufgetreten ist? Wie behebe ich den Fehler? Oder gibt es bessere Möglichkeiten, damit umzugehen? Danke für Ihre Hilfe

Antworten auf die Frage(3)

Ihre Antwort auf die Frage