Cum adaugi un user in grupul de Administratori pe un server

Configurare noua (How To)

Situatie

Vrei sa adaugi mai usor un utilizator in grupul de Administratori.

Solutie

Deschizi Powershell ca administrator si rulezi urmatorul script :

#Variables
$Domain = Read-Host “Domain name:”
$Server = Read-Host “Server name:”
$User = Read-Host “User name:”
#Add user to local admin group (Uses the ADSI adapter)
$AdminGroup = [ADSI]”WinNT://$Server/Administrators,group”
$User = [ADSI]”WinNT://$Domain/$User,user”
$AdminGroup.Add($User.Path)

Tip solutie

Permanent

Voteaza

(0 out of 1 people found this article helpful)

Despre Autor

Cel Mai Apreciat Autor

Leave A Comment?