PowerShell / PowerShellGetv2

PowerShellGet is the Package Manager for PowerShell
https://www.PowerShellGallery.com
MIT License
429 stars 138 forks source link

Unable to install AZ module on Win2012r2 : cycling issues PowershellGet / Nuget / PackageProvider / PSGallery #609

Open egl35720 opened 4 years ago

egl35720 commented 4 years ago

Hello to all,

I have to manage an Azure File Syn Proof of Concept, with data on 3 different Win2012r2 file servers. Our outsourcer that manage Azure Tenant and Azure resources wants I install AZ Module on file servers. So I first installed successfully .NetFramework 4.8 and WinManagement Framework 5.1 ($PSVersiontable.PSVersion = 5.1.14409.1018), HTTPS 443 is enabled toward Internet (also SSL 2.0/3.0 and TLS 1.0/1.1/1.2 enabled on file servers)

FIRST \: So in an Admin Powershell session I ran \: _ _PS C:\Users\emgi-adm> Install-Module Az -AllowClobber

Le fournisseur NuGet est requis pour continuer PowerShellGet requiert le fournisseur NuGet, version 2.8.5.201 ou ultérieure, pour interagir avec les référentiels NuGet. Le fournisseur NuGet doit être disponible dans « C:\Program Files\PackageManagement\ProviderAssemblies » ou « C:\Users\emgi-adm\AppData\Local\PackageManagement\ProviderAssemblies ». Vous pouvez également installer le fournisseur NuGet en exécutant la commande « Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ». Voulez-vous que PowerShellGet installe et importe le fournisseur NuGet maintenant ? [O] Oui [N] Non [S] Suspendre [?] Aide (la valeur par défaut est « O ») : o AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. PackageManagement\Install-PackageProvider : Aucune correspondance trouvée pour les critères de recherche spécifiés pour le fournisseur 'NuGet'. Le fournisseur de package requiert les balises 'PackageManagement' et 'Provider'. Vérifiez si le package spécifié présente ces balises. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 : 21

PackageManagement\Import-PackageProvider : Aucune correspondance trouvée pour le critère de recherche spécifié et le fournisseur de nom « NuGet ». Essayez « Get-PackageProvider -ListAvailable » si le fournisseur existe déjà sur le système. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7411 : 21

AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. PackageManagement\Get-PackageProvider : Impossible de trouver le fournisseur de package 'NuGet'. Il ne peut pas être importé pour l'instant. Essayez 'Get-PackageProvider -ListAvailable'. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7415 : 30

Install-Module : Le fournisseur NuGet est requis pour interagir avec les référentiels NuGet. Vérifiez que la version 2.8.5.201 ou ultérieure de NuGet est installée. Au caractère Ligne:1 : 1

After what I tried \:

PS C:\Users\emgi-adm> Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. Install-PackageProvider : Aucune correspondance trouvée pour les critères de recherche spécifiés pour le fournisseur 'NuGet'. Le fournisseur de package requiert les balises 'PackageManagement' et 'Provider'. Vérifiez si le package spécifié présente ces balises. Au caractère Ligne:1 : 1

I also tried to register PSGAllery

PS C:\Users\emgi-adm> Register-PSRepository -Name "PSGallery" –SourceLocation "https://www.powershellgallery.com/api/v2 " -InstallationPolicy Trusted

Le fournisseur NuGet est requis pour continuer PowerShellGet requiert le fournisseur NuGet, version 2.8.5.201 ou ultérieure, pour interagir avec les référentiels NuGet. Le fournisseur NuGet doit être disponible dans « C:\Program Files\PackageManagement\ProviderAssemblies » ou « C:\Users\emgi-adm\AppData\Local\PackageManagement\ProviderAssemblies ». Vous pouvez également installer le fournisseur NuGet en exécutant la commande « Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ». Voulez-vous que PowerShellGet installe et importe le fournisseur NuGet maintenant ? [O] Oui [N] Non [S] Suspendre [?] Aide (la valeur par défaut est « O ») : o AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. PackageManagement\Install-PackageProvider : Aucune correspondance trouvée pour les critères de recherche spécifiés pour le fournisseur 'NuGet'. Le fournisseur de package requiert les balises 'PackageManagement' et 'Provider'. Vérifiez si le package spécifié présente ces balises. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 : 21

PackageManagement\Import-PackageProvider : Aucune correspondance trouvée pour le critère de recherche spécifié et le fournisseur de nom « NuGet ». Essayez « Get-PackageProvider -ListAvailable » si le fournisseur existe déjà sur le système. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7411 : 21

AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. PackageManagement\Get-PackageProvider : Impossible de trouver le fournisseur de package 'NuGet'. Il ne peut pas être importé pour l'instant. Essayez 'Get-PackageProvider -ListAvailable'. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7415 : 30

Register-PSRepository : Le fournisseur NuGet est requis pour interagir avec les référentiels NuGet. Vérifiez que la version 2.8.5.201 ou ultérieure de NuGet est installée. Au caractère Ligne:1 : 1

Tried to activate Ngut https://docs.microsoft.com/fr-fr/powershell/scripting/gallery/how-to/getting-support/bootstrapping-nuget?view=powershell-7

automatically \: PS C:\Users\emgi-adm> Find-Module -Repository PSGallery -Verbose -Name Contoso

Le fournisseur NuGet est requis pour continuer PowerShellGet requiert le fournisseur NuGet, version 2.8.5.201 ou ultérieure, pour interagir avec les référentiels NuGet. Le fournisseur NuGet doit être disponible dans « C:\Program Files\PackageManagement\ProviderAssemblies » ou « C:\Users\emgi-adm\AppData\Local\PackageManagement\ProviderAssemblies ». Vous pouvez également installer le fournisseur NuGet en exécutant la commande « Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ». Voulez-vous que PowerShellGet installe et importe le fournisseur NuGet maintenant ? [O] Oui [N] Non [S] Suspendre [?] Aide (la valeur par défaut est « O ») : o COMMENTAIRES : Installation du fournisseur NuGet. COMMENTAIRES : Utilisation du fournisseur Bootstrap pour la recherche de packages. COMMENTAIRES : Finding the package 'Bootstrap::FindPackage' 'NuGet','','2.8.5.201','''. AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. COMMENTAIRES : Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '2' more times. COMMENTAIRES : Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '1' more times. COMMENTAIRES : Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '0' more times. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. PackageManagement\Install-PackageProvider : Aucune correspondance trouvée pour les critères de recherche spécifiés pour le fournisseur 'NuGet'. Le fournisseur de package requiert les balises 'PackageManagement' et 'Provider'. Vérifiez si le package spécifié présente ces balises. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7405 : 21

PackageManagement\Import-PackageProvider : Aucune correspondance trouvée pour le critère de recherche spécifié et le fournisseur de nom « NuGet ». Essayez « Get-PackageProvider -ListAvailable » si le fournisseur existe déjà sur le système. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7411 : 21

COMMENTAIRES : Aucune correspondance trouvée pour le critère de recherche spécifié et le fournisseur de nom « NuGet ». Essayez « Get-PackageProvider -ListAvailable » si le fournisseur existe déjà sur le système. COMMENTAIRES : Finding the package 'Bootstrap::FindPackage' 'NuGet','','0.0.0.1','''. AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. COMMENTAIRES : Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '2' more times. COMMENTAIRES : Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '1' more times. COMMENTAIRES : Cannot download link 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409', retrying for '0' more times. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. PackageManagement\Get-PackageProvider : Impossible de trouver le fournisseur de package 'NuGet'. Il ne peut pas être importé pour l'instant. Essayez 'Get-PackageProvider -ListAvailable'. Au caractère C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7415 : 30

Find-Module : Le fournisseur NuGet est requis pour interagir avec les référentiels NuGet. Vérifiez que la version 2.8.5.201 ou ultérieure de NuGet est installée. Au caractère Ligne:1 : 1

PS C:\Users\emgi-adm> Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force AVERTISSEMENT : Impossible de télécharger à partir de l'URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' dans ''. AVERTISSEMENT : Impossible de télécharger la liste des fournisseurs disponibles. Vérifiez votre connexion Internet. Install-PackageProvider : Aucune correspondance trouvée pour les critères de recherche spécifiés pour le fournisseur 'NuGet'. Le fournisseur de package requiert les balises 'PackageManagement' et 'Provider'. Vérifiez si le package spécifié présente ces balises. Au caractère Ligne:1 : 1

Manually \: Dowloading nuget.exe - recommended latest v5.6.0 from https://www.nuget.org/downloads Installed in paths \:

C:\Program Files\WindowsPowerShell\Modules C:\Windows\system32\WindowsPowerShell\v1.0\Modules

Same actions manually with packages \: PowershellGet 1.0.0.1 PackageManagement\1.0.0.1

So PS C:\Users\emgi-adm> get-module -ListAvailable

Répertoire : C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Script 1.3.3 nuget Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...

Répertoire : C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap... Manifest 2.0.0.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest... Manifest 1.0 BestPractices {Get-BpaModel, Get-BpaResult, Invoke-BpaModel, Set-BpaResult} Manifest 1.0.0.0 BitsTransfer {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re... Manifest 1.0.0.0 BranchCache {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa... Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,... Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntry... Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window... Manifest 1.0.0.0 DnsClient {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get... Manifest 2.0.0.0 International {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet... Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs... Manifest 2.0.0.0 IscsiTarget {Add-ClusteriSCSITargetServerRole, Add-IscsiVirtualDiskTar... Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet} Manifest 1.0.0.0 Kds {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC... Manifest 1.0.1.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive} Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter... Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript} Manifest 1.0.0.0 Microsoft.PowerShell.LocalAccounts {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser... Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path... Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...} Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS... Manifest 1.0 MMAgent {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent... Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans... Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne... Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile} Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEvent... Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea... Manifest 1.0.0.0 NetNat {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa... Manifest 2.0.0.0 NetQos {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ... Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse... Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea... Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol... Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese... Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt... Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig... Manifest 1.0 NFS {Get-NfsMappedIdentity, Get-NfsNetgroup, Install-NfsMappin... Script 1.3.3 nuget Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa... Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar... Manifest 1.0.0.0 PKI {Add-CertificateEnrollmentPolicyServer, Export-Certificate... Manifest 1.1 PrintManagement {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin... Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration,... Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS... Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo... Manifest 1.5.1.11 PSWindowsUpdate {Add-WUOfflineSync, Get-WUHistory, Get-WUInstall, Get-WUIn... Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn} Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow Manifest 2.0.0.0 RemoteDesktop {Get-RDCertificate, Set-RDCertificate, New-RDCertificate, ... Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT... Manifest 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo... Script 1.0.0.0 ServerCore {Get-DisplayResolution, Set-DisplayResolution} Script 2.0.0.0 ServerManager {Get-WindowsFeature, Install-WindowsFeature, Uninstall-Win... Cim 1.0.0.0 ServerManagerTasks {Get-SMCounterSample, Get-SMPerformanceCollector, Start-SM... Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha... Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw... Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware... Manifest 1.0.0.0 StartScreen {Export-StartLayout, Import-StartLayout, Get-StartApps} Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add... Manifest 2.0.0.0 TLS {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa... Manifest 1.0.0.0 TroubleshootingPack {Get-TroubleshootingPack, Invoke-TroubleshootingPack} Manifest 2.0.0.0 TrustedPlatformModule {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...} Manifest 1.0.0.0 UserAccessLogging {Enable-Ual, Disable-Ual, Get-Ual, Get-UalDns...} Manifest 2.0.0.0 VpnClient {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio... Manifest 1.0.0.0 Wdac {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...} Manifest 1.0.0.0 WebAdministration {Start-WebCommitDelay, Stop-WebCommitDelay, Get-WebConfigu... Manifest 2.0.0.0 Whea {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy} Manifest 1.0.0.0 WindowsDeveloperLicense {Get-WindowsDeveloperLicense, Show-WindowsDeveloperLicense... Script 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti... Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 0.1.0.2 WinSCP {Open-WinSCPSession, Get-WinSCPItemInformation, New-WinSCP...

AND NOW I AM LOST

HOLY SHIT DON'T YOU HAVE A "yum" or "apt-get" PACKET MANAGER WITH REPOSITORIES THAT WORKS SIMPLY ???

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.54. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

alerickson commented 4 years ago

I've transferred this issue here, as PowerShell/PowerShellGet is the active repository for development of the v3 version.

Please try updating PowerShellGet to version 2.2.4.1 (the latest stable) and starting a new PowerShell session

egl35720 commented 4 years ago

Thank you Alerickson.

I just donwloaded "PowershellGet 2.2.4.1" from PowerShell Gallery. I unzipped "powershellget.2.2.4.1.nupkg" in directory "powershellget" and renammed file "PowerShellGet.nuspec" as "PowerShellGet.nuspec.BAK" so I copied unzipped directory "powershellget" to :

C:\Windows\System32\WindowsPowerShell\v1.0\Modules C:\Program Files\WindowsPowerShell\Modules

After that, I launched a new Admin Powershell session and :\

PS C:\Users\emgi-adm> get-module -ListAvailable

Répertoire : C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Script 1.3.3 nuget Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa... Script 2.2.4.1 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCap...

Répertoire : C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version Name ExportedCommands


Manifest 2.0.0.0 AppLocker {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap... Manifest 2.0.0.0 Appx {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest... Manifest 1.0 BestPractices {Get-BpaModel, Get-BpaResult, Invoke-BpaModel, Set-BpaResult} Manifest 1.0.0.0 BitsTransfer {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re... Manifest 1.0.0.0 BranchCache {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa... Manifest 1.0.0.0 CimCmdlets {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,... Manifest 1.0.0.0 DirectAccessClientComponents {Disable-DAManualEntryPointSelection, Enable-DAManualEntry... Script 3.0 Dism {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window... Manifest 1.0.0.0 DnsClient {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get... Manifest 2.0.0.0 International {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet... Manifest 1.0.0.0 iSCSI {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs... Manifest 2.0.0.0 IscsiTarget {Add-ClusteriSCSITargetServerRole, Add-IscsiVirtualDiskTar... Script 1.0.0.0 ISE {New-IseSnippet, Import-IseSnippet, Get-IseSnippet} Manifest 1.0.0.0 Kds {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC... Manifest 1.0.1.0 Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive} Manifest 3.0.0.0 Microsoft.PowerShell.Diagnostics {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter... Manifest 3.0.0.0 Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript} Manifest 1.0.0.0 Microsoft.PowerShell.LocalAccounts {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser... Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path... Script 1.0 Microsoft.PowerShell.ODataUtils Export-ODataEndpointProxy Manifest 3.0.0.0 Microsoft.PowerShell.Security {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...} Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, Format-Wide...} Manifest 3.0.0.0 Microsoft.WSMan.Management {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS... Manifest 1.0 MMAgent {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent... Manifest 1.0.0.0 MsDtc {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans... Manifest 2.0.0.0 NetAdapter {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne... Manifest 1.0.0.0 NetConnection {Get-NetConnectionProfile, Set-NetConnectionProfile} Manifest 1.0.0.0 NetEventPacketCapture {New-NetEventSession, Remove-NetEventSession, Get-NetEvent... Manifest 2.0.0.0 NetLbfo {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea... Manifest 1.0.0.0 NetNat {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa... Manifest 2.0.0.0 NetQos {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ... Manifest 2.0.0.0 NetSecurity {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse... Manifest 1.0.0.0 NetSwitchTeam {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea... Manifest 1.0.0.0 NetTCPIP {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol... Manifest 1.0.0.0 NetworkConnectivityStatus {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese... Manifest 1.0.0.0 NetworkSwitchManager {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt... Manifest 1.0.0.0 NetworkTransition {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig... Manifest 1.0 NFS {Get-NfsMappedIdentity, Get-NfsNetgroup, Install-NfsMappin... Script 1.3.3 nuget Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-Packa... Manifest 1.0.0.0 PcsvDevice {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar... Manifest 1.0.0.0 PKI {Add-CertificateEnrollmentPolicyServer, Export-Certificate... Script 2.2.4.1 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCap... Manifest 1.1 PrintManagement {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin... Manifest 1.1 PSDesiredStateConfiguration {Set-DscLocalConfigurationManager, Start-DscConfiguration,... Script 1.0.0.0 PSDiagnostics {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS... Binary 1.1.0.0 PSScheduledJob {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo... Manifest 1.5.1.11 PSWindowsUpdate {Add-WUOfflineSync, Get-WUHistory, Get-WUInstall, Get-WUIn... Manifest 2.0.0.0 PSWorkflow {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn} Manifest 1.0.0.0 PSWorkflowUtility Invoke-AsWorkflow Manifest 2.0.0.0 RemoteDesktop {Get-RDCertificate, Set-RDCertificate, New-RDCertificate, ... Manifest 1.0.0.0 ScheduledTasks {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT... Manifest 2.0.0.0 SecureBoot {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo... Script 1.0.0.0 ServerCore {Get-DisplayResolution, Set-DisplayResolution} Script 2.0.0.0 ServerManager {Get-WindowsFeature, Install-WindowsFeature, Uninstall-Win... Cim 1.0.0.0 ServerManagerTasks {Get-SMCounterSample, Get-SMPerformanceCollector, Start-SM... Manifest 2.0.0.0 SmbShare {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha... Manifest 2.0.0.0 SmbWitness {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw... Manifest 2.0.0.0 SoftwareInventoryLogging {Get-SilComputer, Get-SilComputerIdentity, Get-SilSoftware... Manifest 1.0.0.0 StartScreen {Export-StartLayout, Import-StartLayout, Get-StartApps} Manifest 2.0.0.0 Storage {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add... Manifest 2.0.0.0 TLS {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa... Manifest 1.0.0.0 TroubleshootingPack {Get-TroubleshootingPack, Invoke-TroubleshootingPack} Manifest 2.0.0.0 TrustedPlatformModule {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...} Manifest 1.0.0.0 UserAccessLogging {Enable-Ual, Disable-Ual, Get-Ual, Get-UalDns...} Manifest 2.0.0.0 VpnClient {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio... Manifest 1.0.0.0 Wdac {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...} Manifest 1.0.0.0 WebAdministration {Start-WebCommitDelay, Stop-WebCommitDelay, Get-WebConfigu... Manifest 2.0.0.0 Whea {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy} Manifest 1.0.0.0 WindowsDeveloperLicense {Get-WindowsDeveloperLicense, Show-WindowsDeveloperLicense... Script 1.0 WindowsErrorReporting {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti... Manifest 1.0.0.0 WindowsSearch {Get-WindowsSearchSetting, Set-WindowsSearchSetting} Manifest 0.1.0.2 WinSCP {Open-WinSCPSession, Get-WinSCPItemInformation, New-WinSCP...

PS C:\Users\emgi-adm> Import-Module -Name powershellget -force Import-Module : Le module «PackageManagement» requis n'est pas chargé. Chargez le module ou supprimez-le de « RequiredModules» dans le fichier «C:\Program Files\WindowsPowerShell\Modules\powershellget\powershellget.psd1». Au caractère Ligne:1 : 1

PS C:\Users\emgi-adm>

aricbernard commented 3 years ago

It has been more than 6 months, and this is STILL a mess. I have tried executing the instructions available at https://docs.microsoft.com/en-us/azure-stack/operator/powershell-install-az-module verbatim on fresh installs of several Windows OS variants (WS2019, WS2016, Win10) and always have the same result with no viable work around:

Install-Module PowerShellGet -MinimumVersion 2.2.3 -Force WARNING: The version '1.4.7' of module 'PackageManagement' is currently in use. Retry the operation after closing the applications.

I've closed all applications, rebooted systems, formatted hard drives and reinstalled operating systems. I am absolutely not a rocket scientist and should not have to be to install a specific or latest version of PowerShellGet!

SydneyhSmith commented 3 years ago

Thanks @aricbernard what is the output of Get-Module PowerShellGet, PackageManagement -ListAvailable it would also be great to know if you can run this Install-Module PowerShellGet -MinimumVersion 2.2.3 -Force -Debug -Verbose, with elevated privilege's if possible.. thanks!