Batch, CMD and Tasks.

Anything not relating to the X-Universe games (general tech talk, other games...) belongs here. Please read the rules before posting.

Moderator: Moderators for English X Forum

Post Reply
User avatar
Antilogic
Posts: 7526
Joined: Wed, 6. Apr 05, 20:33
x3tc

Post by Antilogic » Mon, 17. Jul 17, 10:00

pjknibbs wrote:
jack775544 wrote: Save that above code as SomeName.ps1. The only extra step you would have to do is change the Windows file association of ps1 files to be powershell instead of the default of notepad.
You would also need to change the Powershell default setting which means it won't run an unsigned script, since there's no way you can sign the script yourself AFAIK.
You can sign it, but it's not necessary for home use. Execution Policies in PowerShell are more about stopping users that don't know what they are doing then any real security - since if you launch .ps1 from Task Scheduler for example, then it runs even if the execution policy is set to restricted.

-RemoteSigned is best practice, but it's not the end of the world if Unrestricted for a home user.

User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 » Mon, 17. Jul 17, 11:57

pjknibbs wrote:You would also need to change the Powershell default setting which means it won't run an unsigned script, since there's no way you can sign the script yourself AFAIK.
I entirely forgot about that since doing that is one of the first things I do when setting up a new computer :D
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.

User avatar
Antilogic
Posts: 7526
Joined: Wed, 6. Apr 05, 20:33
x3tc

Post by Antilogic » Mon, 17. Jul 17, 12:09

jack775544 wrote:
pjknibbs wrote:You would also need to change the Powershell default setting which means it won't run an unsigned script, since there's no way you can sign the script yourself AFAIK.
I entirely forgot about that since doing that is one of the first things I do when setting up a new computer :D
Set-ExecutionPolicy guillotine

Post Reply

Return to “Off Topic English”