Xichael Posted December 10, 2019 Share Posted December 10, 2019 For example, this won't work if the elevated Powershell window is minimized: WinActivate('Administrator: Windows PowerShell') But on an standard unelevated window, this works fine: WinActivate('Windows PowerShell') Link to comment Share on other sites More sharing options...
Deye Posted December 10, 2019 Share Posted December 10, 2019 you will need administrator privileges in your script to be able to automated administrator based tasks add #require admin to the top Link to comment Share on other sites More sharing options...
Xichael Posted December 10, 2019 Author Share Posted December 10, 2019 #RequireAdmin is exactly what I was missing, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now