Add local user with administrator rights and to be disabled in a week

6,275

I think it can be done step by step:

1) Create user:

net user workshop 123456 /add

2) Add user to "Administrators" group:

net localgroup "Administrators" "workshop" /add

3) Set expiration date:

net user workshop /expires:27.02.2016

This looks OK.

Share:
6,275

Related videos on Youtube

Özkan ÖZLÜ
Author by

Özkan ÖZLÜ

Updated on September 18, 2022

Comments

  • Özkan ÖZLÃœ
    Özkan ÖZLÜ over 1 year

    I am preparing my pc lab for a workshop which will take two days.

    I have been told to create local administrator accounts for each computer.

    It is possible to add a user "workshop" with password "123456" usin NET command.

    net user workshop 123456 /add
    net localgroup "Administrators" "workshop" /add
    

    But I need more. I need the user should be disabled after three days. What should be the command line like?

    • Smeerpijp
      Smeerpijp about 8 years
      It's your lab PC, why cant you just log-in after three days and disable the accounts?
    • Jonno
      Jonno about 8 years
      Bear in mind even if there is a way, they could easily undo that, create another account, get in to your main account etc. I'm not sure it would stop much.
    • Özkan ÖZLÃœ
      Özkan ÖZLÜ about 8 years
      @Jonno, thank you for your advise. The guests will not harm the computer I guess.
  • Frank Thomas
    Frank Thomas about 8 years
    Just remember, by making them admin, they can change their expiration time for workstation accounts.
  • Özkan ÖZLÃœ
    Özkan ÖZLÜ about 8 years
    @FrankThomas you are right. Maybe I should change the group. More powerful than limited user, but less authorized than administrator.