If you want to run a PS script when a user logon (logoff) to a computer (to configure user’s environment settings, programs, for example: you want to automatically generate an Outlook signature based on the AD user properties, adjust screensaver or Start layout settings), you need to go to the GPO section: User Configuration -> Policies -> Windows Settings -> Scripts (Logon / Logoff).You must select a GPO section to run the PowerShell script, depending on when you want to execute your PS1 script: Run the domain policy management console – GPMC.msc (Group Policy Management), create a new policy and link it to the desired Active Directory container (OU) with users or computers (you can use WMI GPO filters for fine policy targeting). ![]() ![]() bat batch file as a parameter of the powershell.exe executable). Before Windows 7 and Windows Server 2008 R2, it was impossible to directly run PowerShell files from a GPO (it was necessary to call the.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |