Forum Discussion
louis-m_97
Apr 27, 2020Copper Contributor
Powershell command on domain computers as administrator
Hi, I want to execute a command on all computers in my domain but in order for it to work, it needs to run with elevated permissions. Is there a possibility to do this? my command: get-...
Animesh Joshi
May 06, 2020Brass Contributor
Have you verified this command on a computer where you have administrator level access?
If it provides the information you require, it's a matter of having admin access to all computers and launching PS under that user's context.
get-winevent has a -credential parameter you can use.
louis-m_97
May 08, 2020Copper Contributor
Animesh Joshi I have verified this command with an admin account.
Can you run a scheduled task to all computers to run this script as an admin?
I'ts the first time that i'm trying anything like this so it's all kind of new for me.
- Animesh JoshiMay 10, 2020Brass ContributorYes you can create a scheduled task to run on any number of remote computers as long as the user context under which the command is running has required access on the remote computer.