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 6870231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:39:29+00:00 2026-05-27T03:39:29+00:00

I have made a power shell script which loads pageant (a windows SSH authentication

  • 0

I have made a power shell script which loads pageant (a windows SSH authentication agent)
with my private keys. In short the script isn’t much more than the following two lines:

$tool = "pageant.exe"
&$tool $files.ToArray()

$files is a list of strings which contains all my private keys which must be loaded.

I have no problem with the working of the script because it does its job perfectly when I execute this from my powershell
console.

I want to execute this script whenever I logon to my account and I do this by adding a powershell logon script
group policy with the group policy editor (gpedit.msc), the script also executes and in fact does load the pageant.exe tool.

However the tools utilising the pageant.exe tool (putty and plink) does not work. It doesn’t recognizes the pageant authentication
agent.

So my first question is, what is the difference between starting the script from my own powershell console and starting the script
from a group policy (logon script)?

I also have dome some investigation and I see a couple of differences. The first is thing is that the started pageant tool has a UAC Virtualization flag in my task manager when I start the script from my own console. This property isn’t flagged when it’s started
from the logon script group policy.

The second thing is that when I disable the UAC the script does work from the logon script group policy. So I assume it has something to do with the UAC but I don’t know how to solve this. I want the script to work when the UAC is
enabled as well.

The second question what is this UAC virtualization flag and how does it influence the working of a process? The third and last question is how can I get my script working?

  • 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-27T03:39:30+00:00Added an answer on May 27, 2026 at 3:39 am

    For completeness I added the answers to my own questions.

    1. What is the difference between starting the script from my own powershell console and starting the script from a group policy (logon script)?

      A: The difference comes from the fact that my user is part of the Administrator group which will run the script with elevated rights. When you logon as a administrator, Windows will generate a standard user access token and a administrators access token. The last token will be used to run programs with elevated rights (this is without UAC virtualization). Now when I start the script from my own powershell console, which is started with the standard access token, the started pageant is run with UAC virtualization. If the tools which use pageant run with a different mode, then my problem occurs.

    2. What is this UAC virtualization flag and how does it influence the working of a process?

      A: Check out this link.

    3. How can I get my script to work?

      A: You can use the solution provided by Kate Gregory (do not check run with highest privilege option) or add a batch file to your startup folder which runs the powershell script. This will run the script with the standard user access token and with UAC virtualization enabled.

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

Sidebar

Related Questions

I have made a new windows service which works fine using barebone code (just
I have a need to work with Windows executables which are made for x86,
I have made some code which exports some details of a journal article to
I have made a custom UserControl i Vb.net (windows application). How can I add
I have made a class which a form can inherit from and it handles
I have made an app that starts a service, which starts a timer, which
I'm editing the Windows registry through my software, which for example replaces the Shell
I have made a SVG image, or more like mini application, for viewing graphs
I have made a little app for signing up for an event. User input
I have made a program in c and wanted to see, how much memory

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.