https://github.com/SammyKrosoft/Check-or-Enable-TLS-1.2-with-PowerShell
Pasting Docs Microsoft article extract for future reference
https://github.com/SammyKrosoft/Check-or-Enable-TLS-1.2-with-PowerShell
Last synced: 5 months ago
JSON representation
Pasting Docs Microsoft article extract for future reference
- Host: GitHub
- URL: https://github.com/SammyKrosoft/Check-or-Enable-TLS-1.2-with-PowerShell
- Owner: SammyKrosoft
- Created: 2021-10-07T02:00:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T17:43:30.000Z (about 2 years ago)
- Last Synced: 2024-08-13T07:05:31.789Z (8 months ago)
- Language: PowerShell
- Size: 9.77 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - SammyKrosoft/Check-or-Enable-TLS-1.2-with-PowerShell - Pasting Docs Microsoft article extract for future reference (PowerShell)
README
# Check-or-Enable-TLS-1.2-with-PowerShell
## Pasting Docs Microsoft article extract for future reference (link at the end)
- As of April 2020, the PowerShell Gallery only supports connections using TLS 1.2 or later. For more information, see [PowerShell Gallery TLS Support](https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/).
To check your current settings in the Microsoft .NET Framework, run the following command in Windows PowerShell:
```powershell
[Net.ServicePointManager]::SecurityProtocol
```And to list the available protocols on your local workstation, and on your local Powershell profile you're using (*NOTE that you might have different results whether you launched your PowerShell session using elevated prompt*):
```powershell
[enum]::GetNames([System.Net.SecurityProtocolType])
```As described in the PowerShell Gallery TLS Support article, to *temporarily* change the security protocol to TLS 1.2 to install the PowerShellGet or ExchangeOnlineManagement modules, run the following command in Windows PowerShell *before* you install the module:
```powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
```To *permanently* enable strong cryptography in the Microsoft .NET Framework version 4.x or later, run one of the following commands based on your Windows architecture:
- x64:
```powershell
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Type DWord -Value '1'
```- x86
```powershell
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Type DWord -Value '1'
```For more information, see [SchUseStrongCrypto](https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls#schusestrongcrypto).
>Source: [About the Exchange Online PowerShell V2 module](https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#troubleshoot-installing-the-exo-v2-module)## How-To - List all available security protocols from Powershell