Ejercicios de PowerShell: analizar ficheros DLL en todos los equipos de la red
123..125 | %{"192.168.104." + $_}
123..125 | %{
$ruta="\\192.168.104." + $_ +"\c$\*.dll"
$ruta
}
123..125 | %{
$ruta="\\192.168.104." + $_ +"\c$\*.jes"
ls $ruta
}
1..40 | %{Invoke-Command -ComputerName ("192.168.204." + $_) -ScriptBlock {hostname}}
Invoke-Command -ComputerName dc1 -ScriptBlock {hostname}
gc .\equipos1.txt | % {
$llistar="\\"+$_+"\c$"
ls $llistar | select name,FullName
} | Group-Object name | select Count,Group | where count -eq 1