Switch Logged in user using powershell
Logging in as a Admin, I'm creating a Scheduled Task to be run as a User. The task when fired is run in background. However I need it to be run in foreground. I read that if the same user is logged in, Task Scheduler will run the same task in foreground. Even though Admin is logged in, using powershell, can we trick the scheduler that the user has logged in?
I tried changing below keys in register editor, but no luck.
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData\2\LoggedOnUser
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\SessionData\2\LoggedOnSAMUser
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | User experience | Other
1 answer
Sort by: Newest
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more