Windows Server 2008 R2 Thread, How to create a custom Environment Variable? in Technical; The school I support is part of LGFL and as such they log into their StaffMail accounts with a USO ...
28th October 2011, 12:27 PM #1
- Rep Power
How to create a custom Environment Variable?
The school I support is part of LGFL and as such they log into their StaffMail accounts with a USO username and password.
I want to create a PRF file for Outlook so that staff can login to any computer and Outlook will setup their account and just ask for a password. I've done this before where users were using the same username as their email address login and it worked well but in this instance the USO accound isn't known by the local network.
What I need is to setup USurname in AD so that %USOAccount% returns USuren45.307
That way I can set LGFLMAIL\%USOAccount% in my PRF file to automatically populate the username and %firstname.lastname@example.org will be the users email address.
Has anyone done this?
Last edited by TwoPlus1; 28th October 2011 at 01:00 PM.
IDG Tech News
31st October 2011, 04:56 AM #2
- Rep Power
I haven't tried it but the way I would do it is to store the value in either a custom AD Attribute or an unused standard attribute. Then use either VBScript or Powershell to lookup the attribute in AD for the current user and set that as an environmental value.
This could then be run as a logon script for your users.
31st October 2011, 09:49 AM #3
We use the Setx.exe command (built-in to Windows) to do something similar. It's a bit old-school, but it works well enough.
As ruddj suggested, build up your variables then use setx to set them in a logon script.
More info here:
Setx - Set environment variables
13th January 2012, 09:38 AM #4
- Rep Power
Originally Posted by TwoPlus1
Have you had any luck with this as I am having the same problem?
Any help will be appreciated.
Last Post: 14th September 2011, 11:25 PM
By Dos_Box in forum How do you do....it?
Last Post: 27th April 2009, 07:42 PM
By PEO in forum General Chat
Last Post: 8th May 2008, 03:00 PM
By FN-GM in forum General Chat
Last Post: 15th August 2007, 12:17 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)