I have a login script I wrote years ago and have used with minor tweaking at two different jobs/domains. Now, at the new job, the following code only works when I use my domain admin credentials:

 Code:
$objSys = CreateObject("ADSystemInfo") 
$objUser = GetObject("LDAP://"+$objSys.UserName)

select
	case @time <= "11:59:59" ? " Good morning, " ($objUser.givenName) + " " + ($objUser.sn)
	case @time >= "12:00:00" and @time <= "16:59:59" ? " Good afternoon, " ($objUser.givenName) + " " + ($objUser.sn)
	case @time >= "17:00:00" ? " Good evening, " ($objUser.givenName) + " " + ($objUser.sn)
endselect


With my regular domain user account, I get an error right after the "Good morning, " (or whatever the time case works out to) greeting. With domain admin, it runs just fine.

What could be causing this to not work for the average user?

Thanks!