SOLVED
Home

Failed downloading Az and other modules for powershell

%3CLINGO-SUB%20id%3D%22lingo-sub-1292985%22%20slang%3D%22en-US%22%3EFailed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1292985%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20attempting%20to%20install%20the%20Az%20module%20for%20powershell.%20I%20haven't%20had%20issues%20in%20the%20past%20but%20now%20I%20get%20errors%20when%20trying%20to%20do%20so%20and%20I%20have%20tried%20many%20ways%20to%20do%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20like%20an%20issue%20on%20the%20powershellgallery%20site%20but%20I%20am%20not%20100%25%20sure.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20my%20situation%3C%2FP%3E%3CUL%3E%3CLI%3EOn%20the%20machine%20as%20an%20administrator%3C%2FLI%3E%3CLI%3ERunning%20powershell.exe%20as%20an%20adminsitrator%3C%2FLI%3E%3CLI%3EAttempting%20this%20on%20a%20client%20server%20and%20a%20local%20server%20(where%20I%20previously%20was%20able%20to%20do%20this)%20so%20does%20NOT%20appear%20to%20be%20proxy%2C%20firewall%20or%20security%20related%20in%20any%20way%3C%2FLI%3E%3CLI%3EI%20click%20yes%20to%20run%20from%20untrusted%20repository%20(always%20have%2C%20never%20been%20an%20issue)%3C%2FLI%3E%3CLI%3EI%20receive%20the%20follow%20error%3A%3CUL%3E%3CLI%3EWARNING%3A%20Source%20Location%20'%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2Fpackage%2FAz.Accounts%2F1.7.4%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2Fpackage%2FAz.Accounts%2F1.7.4%3C%2FA%3E'%20is%20not%20valid.%3C%2FLI%3E%3CLI%3EPackageManagement%5CInstall-Package%20%3A%20Package%20'Az.Accounts'%20failed%20to%20download.%3C%2FLI%3E%3CLI%3EAt%20C%3A%5CProgram%20Files%5CWindowsPowershell%5CModules%5CPowerShellGet%5C1.0.0.1%5CPSModule.psm1%3A1772%20char%3A21%3C%2FLI%3E%3CLI%3E%2B%20...%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%24null%20%3D%20PackageManagement%5CInstall-Package%20%40PSBoundParameters%3C%2FLI%3E%3CLI%3E%2B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3C%2FLI%3E%3CLI%3E%2B%20CategoryInfo%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3A%20ResourceUnavailable%3A%20(C%3A%5CUsers%5C%7Busername%7D....Accounts.nupkg%3AString)%20%5BInstall-Package%5D%2C%20Exception%3C%2FLI%3E%3CLI%3E%2B%20FullyQualifiedErrorId%20%3A%20PackageFailedInstallOrDownload%2CMicrosoft.Powershell.PackageManagement.Cmdlets.InstallPackage%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EI%20have%20attempted%20many%20of%20the%20switches%20-Force%20-AllowClobber%26nbsp%3B%20etc%20...%20attempted%20to%20install%20by%20downloading%20locally%20but%20not%20sure%20I%20am%20doing%20that%20right%20as%20it%20doesn't%20seem%20to%20work%20with%20the%20instructions%20I%20have%20found%20around%20the%20web.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20started%20sometime%20last%20week%2C%20perhaps%20Thursday.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20at%20a%20loss%2C%20been%20trying%20this%20for%20way%20too%20long.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20insight%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20ahead%20of%20time!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ES%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1292985%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1294491%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1294491%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F614798%22%20target%3D%22_blank%22%3E%40FineSL60%3C%2FA%3E%26nbsp%3BRegister%20your%20repository%3F%20If%20registered%2C%20de-register%20and%20re-add.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegister-PSRepository%20-Default%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1295838%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1295838%22%20slang%3D%22en-US%22%3EThanks%20for%20the%20response.%20It%20did%20not%20make%20a%20difference%20at%20this%20point.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297388%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297388%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F614798%22%20target%3D%22_blank%22%3E%40FineSL60%3C%2FA%3E%26nbsp%3BWere%20you%20given%20any%20type%20of%20error%20again%20you%20can%20post%20a%20screen%20shot%20of%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297715%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297715%22%20slang%3D%22en-US%22%3E%3CP%3ETeam%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20also%20facing%20the%20same%20issue.%20I%20have%20admin%20privileges%20and%20running%20PS%20as%20admin.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPFB%20the%20error%20scenario.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22esunilkumare_0-1586510177747.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F183576iEDB36B88AC702077%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22esunilkumare_0-1586510177747.png%22%20alt%3D%22esunilkumare_0-1586510177747.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETried%20to%20access%20the%20link%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2Fpackage%2FAz.Accounts%2F1.7.4%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2Fpackage%2FAz.Accounts%2F1.7.4%3C%2FA%3E%26nbsp%3Bvia%20IE%20on%20the%20machine%20and%20the%20package%26nbsp%3Baz.accounts.1.7.4.nupkg%20is%20getting%20downloaded%20without%20any%20issue.%20Hence%20it%20seems%20to%20be%20an%20issue%20with%20PS%20only%2C%20as%20PC%20can%20access%20the%20link.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%20would%20be%20deeply%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E--%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ESunil%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297825%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297825%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F614798%22%20target%3D%22_blank%22%3E%40FineSL60%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616848%22%20target%3D%22_blank%22%3E%40esunilkumare%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20received%20the%20same%20error%20message%20but%20I%20managed%20to%20solve%20it%20by%20swicthcing%20to%20TLS%201.2%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3EPS%20C%3A%5C%26gt%3B%20%5BNet.ServicePointManager%5D%3A%3ASecurityProtocol%20%3D%20%5BNet.SecurityProtocolType%5D%3A%3ATls12%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chalaneru_1-1586515726642.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F183589i0FA9DBEFCDBAA387%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Chalaneru_1-1586515726642.png%22%20alt%3D%22Chalaneru_1-1586515726642.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Chalaneru_0-1586515656916.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F183588i79707F6727E2EC2A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Chalaneru_0-1586515656916.png%22%20alt%3D%22Chalaneru_0-1586515656916.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297951%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297951%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616903%22%20target%3D%22_blank%22%3E%40Chalaneru%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20quick%20help.%20This%20helped%20me%20resolve%20the%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298215%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298215%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616903%22%20target%3D%22_blank%22%3E%40Chalaneru%3C%2FA%3EThank%20you!%20This%20fixed%20it%20for%20me!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1298219%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1298219%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616903%22%20target%3D%22_blank%22%3E%40Chalaneru%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20just%20curious%2C%20why%20did%20it%20require%20that%3F%20Just%20a%20guess%20or%20is%20there%20something%20behind%20it%3F%20I%20can't%20find%20a%20good%20reason%20for%20it%20lol.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1299558%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1299558%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F614798%22%20target%3D%22_blank%22%3E%40FineSL60%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20guessed%20it%20ought%20to%20be%20security%20because%20access%20using%20a%20browser%20was%20successful%20so%20connectivity%20was%20not%20the%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHappy%20this%20helped%20you%20out%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1302063%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1302063%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616903%22%20target%3D%22_blank%22%3E%40Chalaneru%3C%2FA%3E%26nbsp%3Bsaved%20me%20a%20whole%20bunch%20of%20time%20not%20having%20to%20dig%20through%20event%20logs%20to%20figure%20this%20out%20..%20thank%20you%20so%20much%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fcool_40x40.gif%22%20alt%3D%22%3Acool%3A%22%20title%3D%22%3Acool%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1304510%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1304510%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F614798%22%20target%3D%22_blank%22%3E%40FineSL60%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EI%20had%20the%20same%20issue%20on%20the%20same%20day%2C%20so%20kept%20track%20of%20the%20conversation%2C%20it%20was%20great%20that%20they%20announced%20that%20they%20dropped%20less%20than%20TLS%201.2%20support%20only%20on%20the%209th%2C%20after%20already%20having%20done%20so%3A%20%3CA%20href%3D%22https%3A%2F%2Fdevblogs.microsoft.com%2Fpowershell%2Fpowershell-gallery-tls-support%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdevblogs.microsoft.com%2Fpowershell%2Fpowershell-gallery-tls-support%2F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1305881%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1305881%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F597663%22%20target%3D%22_blank%22%3E%40marco_sms%3C%2FA%3EHA!%20That%20sounds%20about%20right!%20Thank%20you%20for%20sharing%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1307702%22%20slang%3D%22en-US%22%3ERe%3A%20Failed%20downloading%20Az%20and%20other%20modules%20for%20powershell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1307702%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F616903%22%20target%3D%22_blank%22%3E%40Chalaneru%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%20this%20fixed%20it%20for%20me!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello,

 

I am attempting to install the Az module for powershell. I haven't had issues in the past but now I get errors when trying to do so and I have tried many ways to do this.

 

It seems like an issue on the powershellgallery site but I am not 100% sure.

 

Here's my situation

  • On the machine as an administrator
  • Running powershell.exe as an adminsitrator
  • Attempting this on a client server and a local server (where I previously was able to do this) so does NOT appear to be proxy, firewall or security related in any way
  • I click yes to run from untrusted repository (always have, never been an issue)
  • I receive the follow error:
    • WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/Az.Accounts/1.7.4' is not valid.
    • PackageManagement\Install-Package : Package 'Az.Accounts' failed to download.
    • At C:\Program Files\WindowsPowershell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772 char:21
    • + ...              $null = PackageManagement\Install-Package @PSBoundParameters
    • +                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • + CategoryInfo          : ResourceUnavailable: (C:\Users\{username}....Accounts.nupkg:String) [Install-Package], Exception
    • + FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.Powershell.PackageManagement.Cmdlets.InstallPackage

I have attempted many of the switches -Force -AllowClobber  etc ... attempted to install by downloading locally but not sure I am doing that right as it doesn't seem to work with the instructions I have found around the web.

 

This started sometime last week, perhaps Thursday.

 

I'm at a loss, been trying this for way too long.

 

Any insight?

 

Thanks ahead of time!

 

S

13 Replies
Highlighted

@FineSL60 Register your repository? If registered, de-register and re-add. 

 

Register-PSRepository -Default 

 

 

Highlighted
Thanks for the response. It did not make a difference at this point.
Highlighted

@FineSL60 Were you given any type of error again you can post a screen shot of?

Highlighted

Team,

 

I am also facing the same issue. I have admin privileges and running PS as admin.

 

PFB the error scenario.

esunilkumare_0-1586510177747.png

 

Tried to access the link https://www.powershellgallery.com/api/v2/package/Az.Accounts/1.7.4 via IE on the machine and the package az.accounts.1.7.4.nupkg is getting downloaded without any issue. Hence it seems to be an issue with PS only, as PC can access the link.

 

Any suggestions would be deeply appreciated.

 

--

Thanks

Sunil

 

Solution

Hi, @FineSL60@esunilkumare 

 

I received the same error message but I managed to solve it by swicthcing to TLS 1.2:

PS C:\> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

 

Chalaneru_1-1586515726642.png

 

Then:

Chalaneru_0-1586515656916.png

 

Regards,

Highlighted

@Chalaneru Thanks for the quick help. This helped me resolve the issue.

Highlighted

@ChalaneruThank you! This fixed it for me!

Highlighted

Hi @Chalaneru 

 

I am just curious, why did it require that? Just a guess or is there something behind it? I can't find a good reason for it lol.

Highlighted

Hi, @FineSL60 

 

I guessed it ought to be security because access using a browser was successful so connectivity was not the issue.

 

Happy this helped you out :)

Highlighted

@Chalaneru saved me a whole bunch of time not having to dig through event logs to figure this out .. thank you so much :cool:

Highlighted

@FineSL60 
I had the same issue on the same day, so kept track of the conversation, it was great that they announced that they dropped less than TLS 1.2 support only on the 9th, after already having done so: https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/

Highlighted

@marco_smsHA! That sounds about right! Thank you for sharing

Highlighted

@Chalaneru 

 

Thank you, this fixed it for me!