Quantcast
Channel: foreach | Operating systems, scripting, PowerShell and security | jesusninoc.com
Browsing all 409 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Encontrar cmdlets en un código de PowerShell que se encuentra en una web

$url = "https://www.jesusninoc.com/2017/06/22/encontrar-cmdlets-en-un-bloque-de-powershell/" $result = Invoke-WebRequest $url #La etiqueta que tenemos buscar es: class="crayon-plain-wrap" $code =...

View Article


Image may be NSFW.
Clik here to view.

Encontrar cmdlets y variables en un bloque de PowerShell que se encuentra en...

$url = "https://www.jesusninoc.com/2017/06/22/encontrar-cmdlets-en-un-bloque-de-powershell/" $result = Invoke-WebRequest $url #La etiqueta que tenemos buscar es: class="crayon-plain-wrap" $code =...

View Article


Image may be NSFW.
Clik here to view.

Leer y analizar (parsear) un archivo JSON con la programación de Movistar+...

cd C:\xampp\php '<?php $url = "http://akamaicache.dof6.com/vod/yomvi.svc/samsung_tizen/profiles/OTT/channels?parentalRating=M18&showNonRated=true"; $json = file_get_contents($url); $jsonIterator...

View Article

Image may be NSFW.
Clik here to view.

Leer y analizar (parsear) el contenido de una página web utilizando PHP desde...

cd C:\xampp\php '<?php $url = "https://www.jesusninoc.com/2018/06/09/how-to-make-an-offline-mirror-copy-of-a-website-with-wsl-windows-subsystem-for-linux/"; $input = @file_get_contents($url) or...

View Article

Image may be NSFW.
Clik here to view.

Mostrar y generar en tiempo real una tabla HTML con el valor nutricional...

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $productosconurl = @{} $web = Invoke-WebRequest...

View Article


Image may be NSFW.
Clik here to view.

Saber quién inició sesión en el sistema operativo de forma detallada...

# 4624: An account was successfully logged on Get-EventLog -LogName Security -InstanceId 4624 | ForEach-Object { # Convertir el contenido del log en un objeto [PSCustomObject]@{ Time = $_.TimeGenerated...

View Article

Convertir varios ficheros RTF en TXT con PowerShell

foreach ($file in ls "C:\Users\juan\Desktop\dplus") { $rtf = New-Object System.Windows.Forms.RichTextBox $rtf.Rtf = [System.IO.File]::ReadAllText($file.FullName) $rtf.Text | Out-File...

View Article

Automatizar el pulsado de teclas en el sistema operativo Windows con PowerShell

#Escribir un texto con SendKeys [System.Windows.Forms.SendKeys]::SendWait("abcdefg") #Escribir un texto retardado con SendKeys foreach($letras in [char[]]"abcdefg") {...

View Article


Image may be NSFW.
Clik here to view.

Encontrar cmdlets en un código de PowerShell

$code = { Get-Process Get-Service $var2 = 12 } [System.Management.Automation.PSParser]::Tokenize($code,[ref]$null) | ForEach-Object { if ($_.Type -eq 'Command') { $_.content } } The post Encontrar...

View Article


Image may be NSFW.
Clik here to view.

Mostrar una tabla HTML con el valor nutricional (azúcares) de todos los...

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $productosconurl = @{} $web = Invoke-WebRequest...

View Article

Image may be NSFW.
Clik here to view.

Ejecutar cmd en PowerShell

# No se puede iniciar "cmd". No se admiten aplicaciones de consola interactivas. Para ejecutar la aplicación, use el cmdlet Start-Process o use la opción "Inicia r PowerShell.exe" del menú Archivo....

View Article

Image may be NSFW.
Clik here to view.

Crear una barra de progreso en PowerShell

1..60 | ForEach-Object { $percent = $_ * 100 / $seconds Write-Progress -Activity Break -Status "$($seconds - $_) seconds remaining..." -PercentComplete $percent Start-Sleep -Seconds 1 } The post Crear...

View Article

Convertir números separados por comas en caracteres que permiten ejecutar el...

# Convertir números en caracteres que permiten ejecutar el cmdlet Invoke-WebRequest .(-join ('105,119,114'.split(",") | forEach {([Int] $_ -As [Char])}))(" https://google.es") The post Convertir...

View Article


Obtener el hash SHA512 de los programas que se están ejecutando en Windows...

[crayon-5d541e7446720854139662/] The post Obtener el hash SHA512 de los programas que se están ejecutando en Windows con PowerShell appeared first on Scripting and security.

View Article

Analizar las conexiones que tiene abiertas el proceso que más CPU consume en...

[crayon-5d541e7446617279540664/] The post Analizar las conexiones que tiene abiertas el proceso que más CPU consume en Windows con PowerShell mediante una función appeared first on Scripting and...

View Article


¿Cómo funciona el bucle foreach en PowerShell (paso a paso)?

[crayon-5d541e744650f124940186/] The post ¿Cómo funciona el bucle foreach en PowerShell (paso a paso)? appeared first on Scripting and security.

View Article

Habilitar la transmisión en tiempo real con Foreach en PowerShell

[crayon-5d541e7446408227982573/] The post Habilitar la transmisión en tiempo real con Foreach en PowerShell appeared first on Scripting and security.

View Article


Mostrar Eventos de Aplicación con PowerShell

[crayon-5d541e74462f9995557760/] The post Mostrar Eventos de Aplicación con PowerShell appeared first on Scripting and security.

View Article

Detectar cuando se pulsa la tecla Enter

[crayon-5d541e7446199813818769/] The post Detectar cuando se pulsa la tecla Enter appeared first on Scripting and security.

View Article

Eliminar los perfiles de los usuarios cuyo último acceso sea inferior a 10 días

[crayon-5d541e7445c1e534153452/] The post Eliminar los perfiles de los usuarios cuyo último acceso sea inferior a 10 días appeared first on Scripting and security.

View Article
Browsing all 409 articles
Browse latest View live