I get an error saying that I have a duplicate command line argument... anyone know why this would be happening and what would be the work-around?
$fileServer = 'server.contoso.local'
$MediaPath = "\\$fileServer\Deployment\Software\AppFabric\"
$MediaName = "WindowsServerAppFabricSetup_x64_6.1.exe"
$cmd = Join-Path $MediaPath -ChildPath $MediaName
$cmd += " /install CachingService , CacheClient , CacheAdmin /SkipUpdates /logfile "
$cmd += " F:\Logs\AppFabric\AppFabricInstallLog.txt "
Invoke-Expression -Command $cmd
Here is the output of the $cmd:
\\server.contoso.local\Deployment\Software\AppFabric\WindowsServerAppFabricSetup_x64_6.1.exe /i CachingService , CacheClient , CacheAdmin /SkipUpdates /logfile F:\Logs\AppFabric\AppFabric\InstallLog.txt
I have narrowed it down to the arguments that are called after the installer. "CachingService , CacheClient , CacheAdmin". Everything else works if I remove "CachingService , CacheClient , CacheAdmin"
One more note to add... if I run this exact same command in CMD.exe it will work just fine. However, my task is automating in PowerShell using DSC (Desired State Configuration)