Automate Posh-SSH installation and uninstallation
Hi,
When I try to automate the Posh-SSH installation on computers, [Install-Module Posh-SSH -Force], it asks about Net-GUI and stops the automation. Is there any way to install Posh-SSH to multiple devices and install any pre-reqs that are involved. Is there also a way to remove it?
Thank you
Net-Gui is not a dependency of it. No clue what module that is.
Sent from my iPhone
On Mar 26, 2020, at 6:04 PM, suryboom [email protected] wrote:
Hi,
When I try to automate the Posh-SSH installation on computers, [Install-Module Posh-SSH -Force], it asks about Net-GUI and stops the automation. Is there any way to install Posh-SSH to multiple devices and install any pre-reqs that are involved. Is there also a way to remove it?
Thank you
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
how are you automating the install?on what version of windows?
It’s on Windows 10. I am just doing PowerShell commands on each pc (using a program to run the commands remotely)
How are you performing the commands? Want to try to replicate to see what the issue might be
I am just doing:
Install- Module Posh-SSH as the first line which is when it asks to install other modules. Would you like the entire script?
On Mar 26, 2020, at 9:49 PM, Carlos Perez [email protected] wrote:
How are you performing the commands? Want to try to replicate to see what the issue might be
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
That would help, I have installed the module on machines with AutomatedLab on Azure for trainings and that is an error I have not seen before.
So, when I run
Install-Module -Name Posh-SSH -Force
This is the output:
NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Windows\system32\config\systemprofile\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet provider now?
|Y> Yes |N> No |S> Suspend [Default is (Y] Install-NuGetClientBinaries : Exception calling "ShouldContinue" with "2" argument(s): "Object reference not set to an instance of an object." At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1762 char:9
-
Install-NuGetClientBinaries -CallerPSCmdlet $PSCmdlet -Proxy ... -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [Install-NuGetClientBinaries], MethodInvocationException
- FullyQualifiedErrorId : NullReferenceException,Install-NuGetClientBinaries
Looks like a psget issue. Have you tried the recomendation and install the version of nugget with install-package first?
Where would I find that?
In the error message you posted
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
On Mar 27, 2020, at 12:47 PM, suryboom [email protected] wrote:
Where would I find that?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/darkoperator/Posh-SSH/issues/318#issuecomment-605104572, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7IHX2RZMSETLQSFIGBG3RJTKCRANCNFSM4LUSI6PQ.