Link to home
Start Free TrialLog in
Avatar of IT Guy
IT GuyFlag for United States of America

asked on

Set PowerShell script or batch file to run before user logs into Windows 10 computer

Is it possible to set a PowerShell script or batch file to run before a user logs into a Windows 10 computer that is a member of a Server 2016 Active Directory domain?

If so how can this be done?
Avatar of footech
footech
Flag of United States of America image

You can set a computer startup script to run via Group Policy.  This will run before any user logs on.

A user logon script will run at the time of logon.  If you need the script to run in the context of the user logging in, you can't have it run before that user logs in because it has no idea what user will be logging in, and has no access to the session, user permissions, etc.
Avatar of IT Guy

ASKER

Can someone please provide me with the exact steps on how to set a computer startup script to run via Group Policy that will run before any user logs on?
ASKER CERTIFIED SOLUTION
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial