How to run powershell commands without admin rights? Is there any option we can use and achive this?

Vinod Survase 4,716 Reputation points

How to run PowerShell commands without admin rights? Is there any option we can use and achieve this?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,371 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,429 questions
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 39,461 Reputation points

    Hello Vinod,

    If your domain administrator hasn't forbidden it, you can do this:

    Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

    If you instead want to change the execution policy for just the current PowerShell session, you can use this command:

    Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process

    However, if your domain administrator is using the "Turn on Script Execution" group policy, you will not be able to change your execution policy at all. The group policy setting makes the Set-ExecutionPolicy cmdlet ineffective.

    --please don't forget to upvote and Accept as answer if the reply is helpful--


    3 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Leon Laude 85,701 Reputation points

    Hi @Vinod Survase ,

    This may depend on your organization's policies, have a look here for a few options on how to run PowerShell commands without admin rights:
    How do I run powershell scripts without admin rights?


    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,

    1 person found this answer helpful.

  2. Limitless Technology 39,461 Reputation points

    Hello Vinod,

    Unfortunately it seems that the issue here is not with Script execution but also with the Basic Authentication settings on your tenant. Basic Authentication seems to be disabled from what is written in the output.

    Not an expert in O365 or scripting to cloud services but I would suggest to check the tenant policies about Basic Authentication, and check by enabling 1 by 1 which is the one that is blocking the execution.
    In the part: Authentication policy procedures in Exchange Online

    Hope that helps.