Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Problem downloading from Powershell Gallery?
    • Sign In

    • State Not Answered
    • Replies 1 reply
    • Subscribers 66 subscribers
    • Views 723 views
    • Users 0 members are here

    Problem downloading from Powershell Gallery?

    Kevin van Haaren
    Offline Kevin van Haaren over 3 years ago

    Just as Bentley is planning on doing shortly, the Powershell Gallery website has disabled TLS 1.0 and 1.1 security protocols. This means installing or updating modules in Powershell now require TLS 1.2. On Windows 10 this seems to be taken care of as I could update my workstation no problem.

    There are 2 solutions for fixing this on other OS (we were having the problem with Server 2016). First is Paul Patterson's note here:

    https://communities.bentley.com/products/projectwise/content_management/f/projectwise-powershell-extensions-forum/195495/1-21-0-0-install-issue

    It shows the command line below will enable TLS 1.2 in your current Powershell session.

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    This is session specific so if you quit Powershell and re-open you'll have to run it again to fix. You can add this command line to your Powershell profile and it will automatically run every time you open Powershell.

    Next fix is a permanent fix that fixes all .NET 4 and after applications. This fixed my Server 2016 issues in all sessions without having to run the command above.

    1. Close all PowerShell sessions
    2. Open RegEdit
    3. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319
    4. Create a DWORD value
      1. Name: SchUseStrongCrypto
      2. Value: 1
    5. (if the value already exists and is value 0, change it to 1)
    6. Next fix for 32-bit apps as well:
    7. browse to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319
    8. Create a DWORD value
      1. Name: SchUseStrongCrypto
      2. Value: 1
    9. (again, set to 1 if it already exists)

    Open Powershell and downloads from PowerShell Gallery should work without issuing the command above. This fix summarized from johnlouros.com/.../enabling-strong-cryptography-for-all-dot-net-applications

    • Sign in to reply
    • Cancel
    • Elahe Burns
      0 Offline Elahe Burns Sun, Apr 26 2020 10:15 PM

      Thanks Kevin,

      As usual very helpful!!

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies