The requested operation requires elevation

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Curtis Smith Curtis Smith 1 week ago.

  • Author
    Posts
  • #72977
    Profile photo of Tony
    Tony
    Participant

    Hi, I have a PowerShell GUI that I'm trying to get to work with Windows 10. I get start-process: this command cannot be run due to the error: The requested operation requires elevation. The GUI works great in windows 7.

    $buttonSetCredentials_Click={
    	#TODO: Place custom script here
    	$global:cred = Get-Credential -Credential 'Dom1\'
    }

    Once the credentials are set I use them to launch applications using my Administrator account.

    $buttonRadiaConsoleSC_Click={
    	#TODO: Place custom script here
    	Start-Process "C:\Program Files\Desktop\DesktopPowershellAPPS\RADIA 91 Console.exe" -Credential $cred
    }

    Any ideas? Thanks for any help in advance.

  • #72982
    Profile photo of Kiran P
    Kiran P
    Participant

    Where are you trying to show up the results?

    Try this...

    Start-Process "C:\Program Files\Desktop\DesktopPowershellAPPS\RADIA 91 Console.exe" -Credential $cred | Out-GridView
    
  • #72985
    Profile photo of Tony
    Tony
    Participant

    Hi, I'm trying to launch the C:\Program Files\Desktop\DesktopPowershellAPPS\RADIA 91 Console.exe with the user I entered with get-credential, Sorry not trying to show results.

  • #73022
    Profile photo of Curtis Smith
    Curtis Smith
    Participant

    Hey @tony-rodal,
    Try adding the runAs verb to your Start-Process

    Start-Process "C:\Program Files\Desktop\DesktopPowershellAPPS\RADIA 91 Console.exe" -Credential $cred -Verb runAs

You must be logged in to reply to this topic.