+ Post New Thread
Results 1 to 12 of 12
Windows Thread, Active Directory 'Wild Cards' in Technical; Hi, Not sure if my title for this topic is appropriate as I have no idea what the name of ...
  1. #1

    Join Date
    May 2007
    Location
    Kent
    Posts
    130
    Thank Post
    39
    Thanked 16 Times in 14 Posts
    Rep Power
    29

    Active Directory 'Wild Cards'

    Hi,

    Not sure if my title for this topic is appropriate as I have no idea what the name of the thing is that I want to ask about!

    When setting up our profiles we use the '%username%' to ensure that the current username is used. I guess you could call this a wild card, but I suppose it has a proper name.

    What I need to do is use group policy to add a local user (called admin) on all our machines to the local admins group. I know where to put this in the policy but I don't know the format to use. I guess it will be something like:

    %localmachine%\admin

    Can someone tell me if the %localmachine% is correct and if not, what it should be. Also, if anyone could provide a list of these 'wild cards' then that would be good too. They are impossible to search for on Google as it wipes out the % sign when you do a search!

    Thanks for your help.

  2. #2

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,683
    Thank Post
    755
    Thanked 1,715 Times in 1,526 Posts
    Rep Power
    438

    Re: Active Directory 'Wild Cards'

    environment variables.

    Ben

  3. #3

    Join Date
    May 2007
    Location
    Kent
    Posts
    130
    Thank Post
    39
    Thanked 16 Times in 14 Posts
    Rep Power
    29

    Re: Active Directory 'Wild Cards'

    Thanks!

    That's good to know. I've found a list on Wikipedia now. Still not found the one I need but perhaps it doesn't exist. Will keep looking!

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227

    Re: Active Directory 'Wild Cards'

    Use %computername%. Additionally, open up a command prompt and type 'set'. That'll give you a list of all the environment variables available to you. If you want to do anything not covered by environment variables I suggest you look at VBS scripting using WMI.

  5. #5

    Join Date
    Jul 2006
    Location
    London
    Posts
    2,963
    Thank Post
    160
    Thanked 153 Times in 117 Posts
    Rep Power
    50

    Re: Active Directory 'Wild Cards'

    What policy setting are you using to accomplish this, just out of interest?

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227

    Re: Active Directory 'Wild Cards'

    I expect he's using a startup script to run the net command locally. I do the same sort of thing to reset the local admin password on bootup.

  7. #7

    Join Date
    May 2007
    Location
    Kent
    Posts
    130
    Thank Post
    39
    Thanked 16 Times in 14 Posts
    Rep Power
    29

    Re: Active Directory 'Wild Cards'

    Thanks for the %computername% info. Will give it a try.

    The policy I am using is:

    computer configuration/windows settings/security settings/restricted groups/

    I added the administrators group and then add the domain or local groups that I want to be a member of it. Seems to work well.

  8. #8
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24

    Re: Active Directory 'Wild Cards'

    sorry to jump in here how would you do that i have been going round chainging all local password by hand every time and it is driving me mad i do it about once a month but it would be easer to use a script

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227

    Re: Active Directory 'Wild Cards'

    Create a batch file containing the following:

    Code:
    net user %COMPUTERNAME%\Administrator %1
    Add the batch file into a GPO as a startup script. Set the parameter to be the password you want to use.

  10. #10
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24

    Re: Active Directory 'Wild Cards'

    ah ok thank for that

  11. #11

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Active Directory 'Wild Cards'

    The %computername% may not be necessary for NET commands. Each command assumes you are referring to local accounts unless you add the AD domain prefix.

  12. #12

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227

    Re: Active Directory 'Wild Cards'

    I know, normally you add the /Domain parameter to the net user command to do operations on the domain. However the above is a hang over for when I had Win2k clients and had to have it work reliably for both those and XP clients.



SHARE:
+ Post New Thread

Similar Threads

  1. active directory all messed up
    By alonebfg in forum Windows
    Replies: 2
    Last Post: 7th January 2008, 09:25 PM
  2. PDA and Active Directory
    By localzuk in forum Windows
    Replies: 4
    Last Post: 10th October 2007, 04:54 PM
  3. Terrastation and active directory
    By edie209 in forum Windows
    Replies: 8
    Last Post: 27th September 2007, 03:46 PM
  4. script for active directory
    By chalkwellstu in forum Scripts
    Replies: 8
    Last Post: 24th September 2007, 02:53 PM
  5. DNS problem under Active Directory.
    By ArchersIT in forum Windows
    Replies: 6
    Last Post: 19th February 2007, 04:09 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •