Я пишу сценарий Powershell для автоматической установки клиента Avamar на нескольких компьютерах.
Вот сценарий, который я написал до сих пор, но он продолжает выдавать ошибки:
#Variables
$computername=Get-Content C:PSdeploy\list.txt
$sourcefile= "\\mydomain.org\public\AvamarClient-windows-x86_64-7.1.100-370.msi"
$credentials = Get-Credential
#This section will install the software
foreach ($computer in $computername)
{
    $destinationFolder = "\\$computer\C$\Temp"
    #This section will copy the $sourcefile to the $destinationFolder. If the Folder does not exist it will create it.
    if (!(Test-Path -path $destinationFolder))
    {
        New-Item $destinationfolder -Type Directory
    }
    Copy-Item -Path $sourcefile -Destination $destinationFolder
    Invoke-Command -ComputerName $computer -ScriptBlock {Start-Process 'c:\temp\AvamarClient-windows-x86_64-7.1.100-370.msi' -ArgumentList msiexec /I} -credential $creds
}
Вот ошибка, которую я получаю:
PS C:\Users\n1254937> C:\Users\myuserid\Desktop\AvamarClient remote install.ps1
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
A positional parameter cannot be found that accepts argument '/I'.
    + CategoryInfo          : InvalidArgument: (:) [Start-Process], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
    + PSComputerName        : test.mydomain.org
Что я делаю неправильно?
