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.
Questo browser non è più supportato.
Esegui l'aggiornamento a Microsoft Edge per sfruttare i vantaggi di funzionalità più recenti, aggiornamenti della sicurezza e supporto tecnico.
Here's the one-liner:
([
ADSI]"WinNT://$computerName/$localGroupName,group").Add("WinNT://$domainName/$userName");
But a script may be more useful for execution.