具有提升权限的RunSpace PowerShell(以管理员身份) [英] RunSpace PowerShell with Heightened Priviledges (as administrator)
问题描述
您好,
我有创建RunSpace的vb.net代码并运行各种PowerShell命令。
I have vb.net code that creates a RunSpace and runs various PowerShell commands.
我需要以管理员身份运行其中一些命令(如果我右键单击powershell并以管理员身份运行并手动粘贴命令进入窗口它工作正常...但无法正常通过我的正常vb.net RunSpace)
I need to run a few of these commands as an administrator (if i right-click on powershell and run as administrator and manually paste the commands into the window it works fine... but doesn't work through my normal vb.net RunSpace)
这是代码。 有什么建议吗?
完全披露这个....大约一年半前我有同样的问题,对于不同的AD域...并且能够得到它工作...我不记得我做了什么...如果我在某处更改了AD权限? 我现在正在运行的代码是一个新域
,拥有完全不同的权限集。 是的我知道...下次写下来???
Here is the code. Any suggestions?
Full disclosure on this.... about a year and 1/2 ago i had the same problem, for a different AD domain... and was able to get it to work... i can't remember what I did... if i changed an AD permission somewhere?? The code i'm running now is a new domain
with completely different permission set.. Yes i know... WRITE IT DOWN next time???
提前致谢!
Chris
推荐答案
https://www.codeproject.com/Articles/17968/Making-Your-Application-UAC-意识到
这篇关于具有提升权限的RunSpace PowerShell(以管理员身份)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!