EFS Encrypted powershell script does not run at startup

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 8 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
msalsal
Posts: 2
Last visit: Sun Nov 29, 2015 1:41 am

EFS Encrypted powershell script does not run at startup

Post by msalsal »

Hi,

I have put a powershell script in my Windows Startup under the following address in 'Group Policy',and it was tested with no problem.
Computer Configuration\Windows Settings\Scripts

To hide the content of my script from unauthorized users, I encrypted my scripts under 'Default Administrator' account. Unfortunately, nothing happened after several restart of Windows as it did not execute at all.

I checked the event log of Windows and saw the error code 403 for my script: "Engine State is changed from Available to Stopped". I could not find the point about the exact cause to my problem.
What is the problem?

Thanks
User avatar
SAPIEN Support Forums
Posts: 945
Last visit: Thu Oct 22, 2015 1:10 pm

EFS Encrypted powershell script does not run at startup

Post by SAPIEN Support Forums »

This is an automated post. A real person will respond soon.

Thank you for posting, msalsal.

Here are some hints to help you get an accurate and complete answer to your question.

Ask in the best forum: If you asked in the wrong forum, just copy your question to the right forum.

Anticipate follow-up questions!

Did you remember to include the following?
  • 1. Product, version and build
    2. 32 or 64 bit product
    3. Operating system, e.g. Windows 7 64 bit.
    4. Attach a screenshot, if applicable
    5. Attach logs, crash reports, etc., in a ZIP file
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: EFS Encrypted powershell script does not run at startup

Post by jvierra »

Hi msalsal -

Unfortunately this is not scripting issue. Encrypted files can only be decrypted by the account that encrypted them.

Consider just signing the file so it cannot be changed.

Generally speaking there is no need to hide the contents of a script. No information or processes should be attempted in a startup or logon file that need to be hidden in any aggressive way.

Check with the Group Policy forum or MS Support to get guidance on what should and should not be put in a startup/logon script.
This topic is 8 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked