#Powershell to list computers that you can remote to:
foreach ($S in $(get-ADComputer -filter * ) {
$ComputerName = $S.DNSHostName
Invoke-Command -ComputerName $ComputerName -ScriptBlock {
$Env:ComputerName
}
}
#Powershell to list computers that you can remote to:
foreach ($S in $(get-ADComputer -filter * ) {
$ComputerName = $S.DNSHostName
Invoke-Command -ComputerName $ComputerName -ScriptBlock {
$Env:ComputerName
}
}