• EnglishSpanishGermanFrenchPolishChinese (Traditional)


EnglishSpanishGermanFrenchPolishChinese (Traditional)

Operating systems, scripting, PowerShell and security

Operating systems, software development, scripting, PowerShell tips, network and security

Menú principal
  • Categorías
  • Cursos
  • Libro de PowerShell
  • Lo mejor
  • Lo último
  • Proyectos
  • Contactar
Ir al contenido

Ejercicios de PowerShell: crear una función que agrupa los nombre obtenidos mediante una resolución DNS (sin mostrar errores)

PowerShell
1
2
3
4
5
6
7
8
9
10
function dnspropio($conexion){
   (Resolve-DnsName $conexion.RemoteAddress -ErrorAction SilentlyContinue).namehost
}
 
$resultado = foreach ($conexion in Get-NetTCPConnection)
{
    dnspropio $conexion
}
 
$resultado | Group-Object

Publicado el día 9 de febrero de 2021

CATEGORÍAS

PowerShell, Red

ETIQUETAS

DNS, Ejercicios de PowerShell, foreach, Function, Get-NetTCPConnection, Group-Object, Jesús Niño, Jesús Niño Camazón, RemoteAddress, SilentlyContinue

MÁS

  • Gestión de usuarios y grupos (Sistemas operativos en red)
  • Cómo depurar scripts en ISE de Windows PowerShell
  • Ejercicios de PowerShell: mostrar los hilos que se están ejecutando y deducir si se pueden relacionar con sockets abiertos (TCP o UDP)
  • Functions in PowerShell
  • Contar el número de palabras que hay en un libro con PowerShell
  • Instalación de sistemas operativos en red (Sistemas operativos en red)