Created
April 19, 2018 11:01
-
-
Save z2z/bbb9853204b2797c283bce90a3b3ba4a to your computer and use it in GitHub Desktop.
Generate Self Signed certificate for SSRS / PowerBI RS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\my -dnsname $env:COMPUTERNAME | |
$Thumbprint = (Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -match "$env:COMPUTERNAME"}).Thumbprint; | |
$pwd=ConvertTo-SecureString "p@ssw0rd" -asplainText -force | |
$file="C:\$env:COMPUTERNAME.pfx" | |
Export-PFXCertificate -cert cert:\LocalMachine\My\$Thumbprint -file $file -Password $pwd | |
Import-PfxCertificate -FilePath $file cert:\LocalMachine\root -Password $pwd | |
Remove-Item $file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment