Relative Content

Tag Archive for powershelladminjobscredentials

Running Powershell script using local and Domain Admin credentials

I’m trying to build a script that requires entering admin credentials only once, and runs commands as admin, some of them as the logged on local user. I don’t want to enter multiple credentials when the PC is already logged in. I’m a Domain Admin, running the script on a Non-Admin’s local PC. I have registry changes to make, and Quality of life changes. Some need to be run as admin, some as local user.

Running Powershell script using local and Domain Admin credentials

I’m trying to build a script that requires entering admin credentials only once, and runs commands as admin, some of them as the logged on local user. I don’t want to enter multiple credentials when the PC is already logged in. I’m a Domain Admin, running the script on a Non-Admin’s local PC. I have registry changes to make, and Quality of life changes. Some need to be run as admin, some as local user.