Skip to content

Conversation

@Miiraak
Copy link
Contributor

@Miiraak Miiraak commented Nov 4, 2025

Hi @ntdevlabs !
A few months ago, in the readme, we changed the Set-Execution policy to a process scoped one to avoid users exposing their machine.

That induces a new problem.
When we start the script without administrator rights, but with the Set-Executionpolicy scoped to Process, the script restarts itself with elevated rights but in the previously set execution policy (likely RemoteSigned).

This patch passes :

  • NoProfile
  • ExecutionPolicy Bypass
  • NoExit
  • File

To the newly created process.

A few months ago, in the readme, we changed the `Set-Execution` policy to a process scoped one to avoid users exposing their machine.

That induces a new problem.
When we start the script without administrator rights, but with the `Set-Executionpolicy` scoped to `Process`, the script restarts itself with elevated rights but in the previously set execution policy (likely `RemoteSigned`).

This patch passes :
- NoProfile 
- ExecutionPolicy Bypass 
- NoExit
- File

To the newly created process.
A few months ago, in the readme, we changed the `Set-Execution` policy to a process scoped one to avoid users exposing their machine.

That induces a new problem.
When we start the script without administrator rights, but with the `Set-Executionpolicy` scoped to `Process`, the script restarts itself with elevated rights but in the previously set execution policy (likely `RemoteSigned`).

This patch passes :
- NoProfile 
- ExecutionPolicy Bypass 
- NoExit
- File

To the newly created process.
@Miiraak
Copy link
Contributor Author

Miiraak commented Nov 4, 2025

NoExit let users see errors.
And i think his error is the UnauthorizedAccess. So patched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant