Export-PfxCertificate has a -ProtectTo you can use instead of -Password; this won’t need a password, it’s tied to the AD user/group.
So if you do:
$cert | Export-pfxcertificate -ProtectTo yourUsername
yourUsername will be able to open that cert without entering a password.
|
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntpowershell...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BjAABgFB7FviKu8_tMAKv9RmyaxDHcEbaaBTTgP5GiyQw%40mail.gmail.com.
You can also import the PFX file on a “signing” workstation where it would also be available.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/CH0PR04MB8129B74D41D26E9AFAB6C118BC572%40CH0PR04MB8129.namprd04.prod.outlook.com.
You can also import the PFX file on a “signing” workstation where it would also be available.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/bbccc71f3cce41868fa6756d4eaf261c%40smithcons.com.
>> Anyway, am I correct that if we have a PS script, then the cert we use to sign the
>> script must also be pushed to the Trusted Publisher store on whatever host(s)/workstations
>> the script executes on? (Easily enough done using a GPO).
If it’s a self-signed cert, then yes. If it’s signed by an enterprise CA, then it needs to be the root of the enterprise CA (which is what I believe you wrote you are using).
But your scripts don’t have to be signed (yes, it’s a best practice – I’m not suggesting otherwise). You can copy them over to a target device and then run them with “executionpolicy bypass”.
Neither Enable-BitLocker or manage-bde accept a computername parameter. They must be executed locally.
If you have Intune – it’s easier than dealing with either of the command-line options IMO.
If you are doing code-signing for internal consumption, then it definitely should be per-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2Bii5jJR%2Bi7892HNpc%3Dc9S4epzVOHy7fM_P6T5g3bkK7jg%40mail.gmail.com.
>> Anyway, am I correct that if we have a PS script, then the cert we use to sign the
>> script must also be pushed to the Trusted Publisher store on whatever host(s)/workstations
>> the script executes on? (Easily enough done using a GPO).
If it’s a self-signed cert, then yes. If it’s signed by an enterprise CA, then it needs to be the root of the enterprise CA (which is what I believe you wrote you are using).
But your scripts don’t have to be signed (yes, it’s a best practice – I’m not suggesting otherwise). You can copy them over to a target device and then run them with “executionpolicy bypass”.
Neither Enable-BitLocker or manage-bde accept a computername parameter. They must be executed locally.
If you have Intune – it’s easier than dealing with either of the command-line options IMO.
If you are doing code-signing for internal consumption, then it definitely should be per-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntpowershell/cdc9a5d4f2de4c3f99374eff3fccabb7%40smithcons.com.