I am trying to use package manager to install our packages. Those are .msi files and not Nuget Or Chocolatey Packages.
I stored them on a share drive we have.
Localy, everything run great. I run:
Install-package "\\nameofserver\share\program.msi"
However, when I try remotely like this:
Invoke-Command -ComputerName $computer -credential $cred -Scriptblock {Install-Package "\\nameofserver\share\program.msi"}
I get this error (it's in french so I'll translate):
No match was found for the specified search criteria and package name \servername\share\program.msi
Use get-packagesources to find all packages sources available.
I don't have a package provider... it is a MSI file! Got any idea how to make this work?
I tried trying to include providername. Didn't work. I don't get why it works locally but NOT using invoke-command
....
*** edit here is the code that works:
Invoke-Command -ComputerName $Computer -Credential $Cred -ScriptBlock {$null = New-PSDrive -Credential $using:Cred deploywin -Root (Split-Path -Parent $using:SharePath) -PSProvider FileSystem Install-Package '\servername\share\MSI\node-v11.13.0-x64.msi'}