good morning. my org just upgraded me to windows 10. Yay! however, i am not able to install powercli on powershell. i have downloaded the package and extracted same and put it in my modules folder. i have followed this article https://aventistech.com/install-powercli-10-on-windows-10/
Set-ExecutionPolicy RemoteSigned
#Install NuGet
Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force (this was successful)
Save-Module -Name VMware.PowerCLI -Path C:\Temp\PowerCLI
PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'VMware.PowerCLI'. Try Get-PSRepository to see all
available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1598 char:21
+ $null = PackageManagement\Save-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage
Install-Module Vmware.PowerCLI -Force
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'Vmware.PowerCLI'. Try Get-PSRepository to see
all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
PS C:\Windows\system32> Get-PSRepository
WARNING: Unable to find module repositories.
PS C:\Windows\system32> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 16299 98
PS C:\Windows\system32> Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
nuget 2.8.5.201
NuGet 2.8.5.208 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions,...
PowerShellGet 1.0.0.1 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, Filter,...
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent
thoughts?
Your PowerShellGetversion is quite old, can you try to upgrade that first?
You will probably need to run this as Administrator
Install-Module –Name PowerShellGet –Force
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm having the same problem and the
> Install-Module -Name PowerShellGet -Force
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PowerShellGet'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
> Get-PSRepository
WARNING: Unable to find module repositories.
Are you perhaps behind a proxy?
If yes, try the following (change to your proxy + port)
[system.net.webrequest]::defaultwebproxy.credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[system.net.webrequest]::defaultwebproxy.BypassProxyOnLocal = $true
Then do
Register-PSRepository -Default
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am having the exact same problem, did you ever find a fix?
If you also have that same old PowerShellGet version, you will have to upgrade that first.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm actually running PowerShell on a RHEL7 server, I got the latest version from the repository but am running into a bunch of problems, I did what you did regarding the proxy but I'm still receiving these errors, do you know if VMware.VimAutomation.Core will run on Linux anyways? Also here are my errors if it helps:
What does it say when you do
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That error mostly shows when you are behind a proxy.
Does this make a difference?
$webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[Net.ServicePointManager]::SecurityProtocol = "tls12"
Install-Module -Name VMware.PowerCLI -Verbose
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Here is what I get, I also tried what you suggested the original person with my proxy credentials, but it did not work either. Sorry if I don't know enough about this stuff, I am currently just an intern working on a linux server remotely and having trouble getting modules installed.
It might be something with the proxy.
You could try using the proxy parameters on the Install-Module cmdlet, and see if that makes a difference.
Install-Module -Name VMware.PowerCLI -proxy http://<your-proxy> -ProxyCredential $cred -Verbose
Also, which PowerShell version do you have installed?
Do a $PSVersionTable
There have been some long discussions on this issue on the PowerShell repo, see issue #7827
And there have been many proposed solutions, including the TLS version.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
so running the command below actually resolved my issue. Thank you for the help
LucD
i ran what is below as two different commands and it worked or me.
$webclient=New-Object System.Net.WebClient
$webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[Net.ServicePointManager]::SecurityProtocol = "tls12"
Install-Module -Name VMware.PowerCLI -Verbose
No, the issue I referred to was in version 6.1
I'm afraid I'm at my wits end here.
Can you perhaps with the team that administrates the proxy?
They might be able to see in the proxy logs what is blocking, if anything at all.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference