cancel
Showing results for 
Search instead for 
Did you mean: 

How to attach power shell window(Opened in run as administrator)?

PriyambadaPanda
Level 3
Hi, This is Priyambada Panda.I have opened Power shell window (run as administrator) from command prompt.I am trying to attach the same window.so that i can spy the window and i can write something inside power shell window.But i am not able to attach the Power shell window.Please help me. Thank You, Regards, Priyambada Panda
3 REPLIES 3

Denis__Dennehy
Level 15
I guess there could be some windows security stopping you attaching to an appliation running at a higher administrative security level? I would be interested to understand what you need to attach and use Powershell for that cannot be done via code stages which exposes the entire .NET framework? I have seen a few threads on this forum about people interfacing with Powershell which makes no sense to me. Powershell is just a scripting app that wraps command line and the .NET framework - there is nothing you can do in Powershell that you could not build into a Blue Prism VBO object using code stages.

PriyambadaPanda
Level 3
I was trying to start and stop windows Services through Command Prompt.For that have tried with Command prompt(net start Service name),But it is not working with out administrator rights.so that i have tried to open powershell(Run as administrator) from cmd through(Start-Process powershell -Verb runAs) command line and i am trying to attach powershell ,but its not happening. If you have any other idea to start and stop windows services through command prompt.please share with me. Thank you in advance

DavidEdwards-Da
Level 5
It is a permissions issue, you cannot send events to an application that has higher permissions than yours. Stopping/Starting services usually requires administrative privs, however you can use the SubInACL utility from Microsoft to add regular user accounts who can start and stop specific services. https://www.microsoft.com/en-us/download/details.aspx?id=23510 Here's the code you would need to start/stop a service within a code stage for Blue Prism: https://msdn.microsoft.com/en-us/library/aa331793%28v=VS.71%29.aspx