Would it be at all possible to add the ability to launch snapins with a admin domain account ? Our registry and things get locked down via policies but I have snapins that need to import reg settings and they will only import if running script as a domain admin.
I think the problem was launching a powershell script that then launched another script as a domain admin but the credentials wont populate when it is being run from the system account just asks for password in a non visible console.
I have compiled the main powershell script as an exe which is then run via the system account and seems to be working now with the exception of not running as domain admin.
you did something similar to this?
a little quote from that thread:
Scratch that, scripts converted to exe and run by double click work perfect but if I set a snapin to run the exe it never actually starts as far as I can see.
Thanks for the reply, I just thought it would make it easier on us to do this kind of thing but I think I have a work around in the mean time using powershell to run a powershell script as admin user using cached credentials from a securestring ( saves using a 3rd party app which would get blocked via our antivirus anyway).
Testing as we speak to make sure it works across all images.
you can use the runas command but it needs the user account password entered!
Admin everyday life | 2 Comments
In a domain environment (domain) administrators usually work with two user accounts: An account for the “normal” work and an account that is privileged and extensive rights.
Annoying as it is, if you constantly invoke the context menu the “Run As …” command and must enter your user name and password for the umpteenth time.
There are several tools that promise a relief here, but almost all seem to cost money.
A free version, the PC world by 2009 with the tool pcwRunAs[/B] published, which allows you to create shortcuts to applications, which can then be started automatically with a privileged account.
It is also not even necessary to enter a password, it is stored encrypted namely (using the hard drive serial number).
In any case, a clear recommendation for any admin who has repeatedly durchexerzieren the above procedure every day.