Login Scripts Fail to Map Network Drives

This only applies to you if UACĀ  is enabled and users are a member of the local administrators groups. I was doing some work recently for a client when I noticed that a login script was failing to map network drives if deployed through group policy. The strange thing is that if I ran the script manually it worked. Also, at other sites this same login script works perfectly fine whether it’s run by itself or deployed through group policy. The only difference I could find was that users were local admins at the site where the script fails. When users are local administrators UAC comes into play.