Logon script not updating
Group Policy allows you to run various script files at a computer startup/shutdown or during user logon/logout.
Run the domain policy management console – (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). You must select a GPO section to run the Power Shell script, depending on when you want to execute your PS1 script: Now you need to copy the file with your Power Shell script to the domain controller.
Hi, So I have the below login script set for all users to map a network drive located on another network which the office has a VPN tunnel to:@echo offecho Please type your network user nameset /p username=echo Please type your network passwordset /p password=Net use Z: \Share\Shared$ /user: DOMAIN\%username% %password% /persistent: YESThe script works fine when run manually, but I just cant seem to see why it doesn't run on logon.With this procedure, you can only link ONE logon script to each user, and you must do it ONE USER AT A TIME, or, if you have the knowledge – script the changes in Active Directory (there are methods to do this, but I won’t get into detail here).If you plan to have more than ONE logon script, and if you wish to assign that/those script(s) to more than one user, you might want to look into the “Setting up a Logon Script through GPO in Windows Server 2008” article.Next, we need to decide what user should have the logon script.We will work in that user’s user account in Active Directory Users and Computers.
Also check permissions by trying to manually run the script from the right path but while logged on as the user, and not as an administrator.