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)
Leave A Comment?