Come controllare da remoto un computer client utilizzando Server Manager da un controller di dominio

()

Per trovare in remoto i computer online e gli utenti registrati in un dominio Active Directory tramite PowerShell su Windows Server, puoi utilizzare i seguenti comandi:

  1. Trovare i computer online nel dominio
    Per ottenere un elenco dei computer che sono attualmente online, puoi utilizzare Get-ADComputer combinato con Test-Connection:
    powershell

    Get-ADComputer -Filter * -Property Name | ForEach-Object { if (Test-Connection -ComputerName $.Name -Count 1 -Quiet) { $.Name } }
    Spiegazione:
  • Get-ADComputer -Filter * -Property Name: recupera tutti i computer dal dominio.
  • Test-Connection -ComputerName $_.Name -Count 1 -Quiet: verifica se il computer è online (ritorna $true o $false).
  • Se il computer è raggiungibile, il suo nome viene mostrato.
    Nota: Questo metodo funziona solo se i computer rispondono ai ping ICMP.
  1. Trovare gli utenti registrati nel dominio
    Per ottenere l’elenco degli utenti registrati in Active Directory, usa:
    powershell

    Get-ADUser -Filter * -Property SamAccountName, Name, Enabled | Select-Object SamAccountName, Name, Enabled
    Spiegazione:
  • Get-ADUser -Filter *: recupera tutti gli utenti.
  • -Property SamAccountName, Name, Enabled: include informazioni aggiuntive.
  • Select-Object SamAccountName, Name, Enabled: mostra solo i campi essenziali.
    Se vuoi vedere solo gli utenti attivi:
    powershell
  • Get-ADUser -Filter {Enabled -eq $true} | Select-Object SamAccountName, Name
  • Se hai bisogno di dettagli su un utente specifico:
    powershell

    Get-ADUser -Identity “NomeUtente” -Properties * | Format-List
  • Per controllare da remoto un computer client utilizzando Server Manager da un Controller di Dominio (DC), segui questi passaggi:

Prerequisiti

  • Abilitare la gestione remota sul client
    Sul computer client (da controllare), esegui PowerShell come amministratore e abilita la gestione remota:
    powershell

Enable-PSRemoting -Force

  • Assicurarsi che il firewall permetta il traffico WMI e WinRM
    Esegui sul client:
    powershell

netsh advfirewall firewall set rule group=”Windows Management Instrumentation (WMI)” new enable=yes netsh advfirewall firewall set rule group=”Windows Remote Management” new enable=yes

  • Abilitare la gestione remota dei server nel dominio
    Sul controller di dominio, apri Group Policy Management e abilita i criteri seguenti:
  • Allow remote server management through WinRM (Computer Configuration → Policies → Administrative Templates → Windows Components → Windows Remote Management)
  • Enable WinRM Service
  • Aggiungere il client al gruppo “Remote Management Users”
    Sul client:
    powershell

net localgroup “Remote Management Users” /add “DOMAIN\Admin”

Passaggi per la gestione remota da Server Manager

  1. Aprire Server Manager
  • Sul Controller di Dominio (DC), apri Server Manager.
  1. Aggiungere il computer client
  • Clicca su “Gestisci” (Manage) → “Aggiungi server” (Add Servers).
  • Nella scheda “Active Directory”, cerca il nome del computer client.
  • Selezionalo e clicca “OK”.
  1. Controllare lo stato del client
  • Vai alla sezione “Tutti i server” (All Servers) in Server Manager.
  • Qui vedrai lo stato del client (Online, Offline, etc.).
  • Se risulta Gestibile, puoi procedere alla gestione remota.
  1. Avviare strumenti di gestione remota
  • Clicca col tasto destro sul nome del client e seleziona:
  • Computer Management (per visualizzare eventi, utenti locali, dischi, servizi).
  • Remote Desktop Connection (se RDP è abilitato).
  • Windows PowerShell (per eseguire comandi remoti).
    Verificare il funzionamento
    Per assicurarti che la gestione remota funzioni, prova dal DC a eseguire questo comando PowerShell:
    powershell

Test-WSMan -ComputerName NomeClient

Se il comando ha successo, significa che WinRM è attivo e puoi gestire il computer client da remoto.
Questa configurazione è utile per amministrare client nel dominio senza dover accedere fisicamente alle macchine.

/ 5
Grazie per aver votato!

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?