# Script Signing for domain

**URL:** <https://forums.powershell.org/t/script-signing-for-domain/25446>\
**Category:** PowerShell Help\
**Created:** [February 15, 2025, 8:16pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446 "2025-02-15T20:16:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian-clanton](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@brian-clanton](https://forums.powershell.org/u/brian-clanton)\
**Post date:** [February 15, 2025, 8:16pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/1 "2025-02-15T20:16:00Z")

</div>

I am trying to roll out a new AV solution to our data center via PS script, however our script signing enforces the ‘AllSigned’ execution policy, so I need to sign my script. I am a newbie when it comes to certs and our Engineer says I can use a self signed cert to sign my script. I am having doing this and believe I need a CA cert to accomplish what I need. Can anyone direct me to documentation if this is possible with self signed certs…or not? I can’t find anything definitive.

---

<div class="post-metadata">

**Author:** ![grey0ut](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/grey0ut/32/5310_2.png) [@grey0ut](https://forums.powershell.org/u/grey0ut)\
**Post date:** [February 15, 2025, 8:41pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/2 "2025-02-15T20:41:13Z")

</div>

From a certificate standpoint, if you wanted to use a self-signed cert then your CA (yourself) would have to be installed as a trusted root cert on every machine you run the script on. That sounds like a non-starter to me.  
But if you guys have a Public Key Infrastructure (PKI) already then someone should be able to set you up with a code-signing cert.

Also, is Powershell the best solution for rolling out an AV solution? No other options?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [February 15, 2025, 8:58pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/3 "2025-02-15T20:58:17Z")

</div>

Brian,

I think your question is way to brought to be answered in a forum like this and it is actually not a PowerSehll question anymore.

I assume you already read …

> **[about\_Signing - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_signing?view=powershell-7.5)**
>
> Explains how to sign scripts so that they comply with the PowerShell execution policies.

…, right?

Your question might fit better in a forum about general Windows environments, Active Directory, systems management and about PKI infrastructure.

You may start here:

> **[Public key infrastructure](https://en.wikipedia.org/wiki/Public_key_infrastructure)**
>
> A public key infrastructure (PKI) is a set of roles, policies, hardware, software and procedures needed to create, manage, distribute, use, store and revoke digital certificates and manage public-key encryption. 
> The purpose of a PKI is to facilitate the secure electronic transfer of information for a range of network activities such as e-commerce, internet banking and confidential email. It is required for activities where simple passwords are an inadequate authentication method and more rigoro...

> [@brian-clanton](#):
>
> roll out a new AV solution to our data center

How would you like to do that actually? That’s better done with a software deployment solution, I think. 😉

---

<div class="post-metadata">

**Author:** ![brian-clanton](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@brian-clanton](https://forums.powershell.org/u/brian-clanton)\
**Post date:** [February 16, 2025, 2:35pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/4 "2025-02-16T14:35:17Z")

</div>

The AV solution’s ‘method’ for rollout ‘en-masse’ is via GPO which it also provides a canned PS script to facilitate the install. For initial rollout, workaround is that I can pipe the install commands via invoke-command and the pipe our servers into that, not essentially running a script. Ideally would like to have the GPO in place so any ‘new’ VM’s that are spun up automatically receive the AV. However, in hindsight, my question is more about code signing cert than actually powershell.

---

<div class="post-metadata">

**Author:** ![GrandeAnde](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/grandeande/32/5885_2.png) [@GrandeAnde](https://forums.powershell.org/u/GrandeAnde)\
**Post date:** [February 19, 2025, 12:31pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/5 "2025-02-19T12:31:27Z")

</div>

Do you have any kind of configuration management tool or end point management system like SCCM? It may be better to invest time and money into getting a viable solution like this up and running if you have a data center. It will offer a lot of nice features that you just can’t do via powershell, like reporting, compliance, device organization, etc.

---

<div class="post-metadata">

**Author:** ![brian-clanton](https://avatars.discourse-cdn.com/v4/letter/b/ebca7d/32.png) [@brian-clanton](https://forums.powershell.org/u/brian-clanton)\
**Post date:** [February 19, 2025, 1:22pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/6 "2025-02-19T13:22:53Z")

</div>

We are already 95 percent rolled out with the new AV. I just wanted a GPO in place / with code signed, as other technicians add new VM’s, they will automatically get the new AV installed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [March 21, 2025, 1:23pm UTC](https://forums.powershell.org/t/script-signing-for-domain/25446/7 "2025-03-21T13:23:27Z")

</div>

Closed on March 21, 2025, 1:23pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
