Browse Source

Update Sign.ps1

pull/380/head
Dmitry Nefedov 2 years ago
committed by GitHub
parent
commit
87092d7ab5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Scripts/Sign.ps1

2
Scripts/Sign.ps1

@ -1,7 +1,7 @@
cls cls
# Sign all scripts in folder recursively by a self-signed certificate # Sign all scripts in folder recursively by a self-signed certificate
$CertName = "Sophia Project" $CertName = "Sophia Project"
$FolderPath = "D:\Sophia-Script-for-Windows\Sophia Script" $FolderPath = "$PSScriptRoot\Sophia Script"
$ExtensionsToSearchIn = @(".ps1", ".psm1", ".psd1") $ExtensionsToSearchIn = @(".ps1", ".psm1", ".psd1")
Get-ChildItem -Path Cert:\LocalMachine\My, Cert:\CurrentUser\My | Where-Object -FilterScript {$_.Subject -eq "CN=$CertName"} | Remove-Item Get-ChildItem -Path Cert:\LocalMachine\My, Cert:\CurrentUser\My | Where-Object -FilterScript {$_.Subject -eq "CN=$CertName"} | Remove-Item

Loading…
Cancel
Save