mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 00:44:55 -06:00
Many Microsoft employees have contributed to the Windows Subsystem for Linux, this commit is the result of their work since 2016. The entire history of the Windows Subsystem for Linux can't be shared here, but here's an overview of WSL's history after it moved to it own repository in 2021: Number of commits on the main branch: 2930 Number of contributors: 31 Head over https://github.com/microsoft/WSL/releases for a more detailed history of the features added to WSL since 2021.
16 lines
939 B
PowerShell
16 lines
939 B
PowerShell
[CmdletBinding()]
|
|
param (
|
|
[string]$OutputPath
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
Set-StrictMode -Version Latest
|
|
# Set PSModulePath environment variable explicitly to work with PowerShell 7
|
|
$env:PSModulePath = [Environment]::GetEnvironmentVariable('PSModulePath', 'Machine')
|
|
|
|
$cert = New-SelfSignedCertificate -Type Custom -Subject "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" -KeyUsage DigitalSignature -FriendlyName "WSL Dev cert" -CertStoreLocation "Cert:\CurrentUser\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}") -HashAlgorithm "SHA256" -NotAfter (Get-Date).AddYears(10)
|
|
|
|
Export-PfxCertificate -cert "Cert:\CurrentUser\My\$($cert.Thumbprint)" -FilePath $OutputPath -Password (New-Object System.Security.SecureString) | Out-Null
|
|
Remove-Item "Cert:\CurrentUser\My\$($cert.Thumbprint)" -DeleteKey | Out-Null
|
|
|
|
Write-Host "Created new dev certificate in $OutputPath" |