What is the common practice for executing set-executionpolicy in a production environment?

When providing a script for clients, the script will not run unless they have executed set-executionpolicy.

What is the general practice of providing a script to clients?

Whether the set-executionpolicy command will be run as the first command in the script so that it runs without any error or whether some documents were captured in relation to set-executionpolicy.

This is the first time I have given a powershell script to our clients. I used to just used to execute in our environment, so I didn’t think about it.

Someone please help me tell you about this

+5
source share
2 answers

One approach:

bat .ps1, - :

@powershell -ExecutionPolicy RemoteSigned -File script.ps1
+6

script , REMOTESIGNED.

. , , , . , - .

+4

All Articles