Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:34:34+00:00 2026-05-25T18:34:34+00:00

I would not be surprised if this is not possible, but I need to

  • 0

I would not be surprised if this is not possible, but I need to set the execution policy (on the 32 bit PowerShell environment) on several build servers – it would be much quicker if I could script this, but my current attempt,

%SystemRoot%\syswow64\WindowsPowerShell\v1.0\
    powershell.exe -Version 2
    -Command "& {Set-ExecutionPolicy -ExecutionPolicy RemoteSigned}"

completes without any visible error, but the execution
policy is not being set.

I guess it would create a bit of a security hole if users could be tricked into running a script that changed their execution policy, but I thought I would ask the question anyway.


OK – so Richard and Craika are entirely correct and I am a little bit stupid.
After retrying the command – I find that it does work (despite what I said in the question). I guess I must have been getting mixed up between 32 and 64 PowerShell windows (i.e. setting the execution policy in one and then checking the value in another).

Apologies.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:34:34+00:00Added an answer on May 25, 2026 at 6:34 pm

    You can do this, but the script will be run or not run under the currently (ie. before the script) in force execution policy.

    The obvious approach would be to sign the script with a trusted certificate.

    However if you want to manage the servers collectively, why not put them in an Active Directory OU or group and then use Group Policy to set the execution policy?

    (And don’t forget you’ll need to set it for both 32 and 64bit processes.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe I am not from this planet, but it would seem to me that
I initially thought that 64 bit instructions would not work on OS-X 10.5. I
Does anybody know why the same code from this page http://emacsformacosx.com/ would not render
I expected this to be a simple task, but I'm surprised to find no
Google results on this one are a bit thin, but suggest that it is
I'm surprised this hasn't come up yet. In T-SQL, I need to find the
For reasons that I would not like to discuss, our master database schema is
One would expect that even though strings are immutable, value-equality and reference-equality would not
I am confused as to why the following code snippet would not exit when
I recently created my first android live wallpaper and it would not work on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.