PowerShell for Non-N00bs: Adding a User to a Group (with Script)
Here's the one-liner:
([
ADSI]"WinNT://$computerName/$localGroupName,group").Add("WinNT://$domainName/$userName");
But a script may be more useful for execution.
Não há mais suporte para esse navegador.
Atualize o Microsoft Edge para aproveitar os recursos, o suporte técnico e as atualizações de segurança mais recentes.
Here's the one-liner:
([
ADSI]"WinNT://$computerName/$localGroupName,group").Add("WinNT://$domainName/$userName");
But a script may be more useful for execution.