This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ConvertFrom-DockerPS { | |
| <# | |
| .SYNOPSIS | |
| Parses docker ps output to make it more readable | |
| .DESCRIPTION | |
| Pipe the results of Docker ps to this function and get the results in a nice, more powershelly format | |
| .PARAMETER | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :CHEQUEASERVER | |
| REM Se fija que sea windows XP, Vista, 7 u 8. | |
| REM Si no es, no instala | |
| systeminfo | find "Microsoft Windows" > %TEMP%\osname.txt | |
| FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i | |
| echo %vers% | find "Windows 7" > nul | |
| if %ERRORLEVEL% == 0 goto SIGUE | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| echo Este ejecutable te devuelve todo lo que tenias en el pendrive. | |
| echo Acordate de borrar todos los accesos directos y los .EXE que estan aca. | |
| attrib /d /s -r -h -s *.* | |
| echo. | |
| echo. | |
| echo Listo! | |
| echo. | |
| echo. | |
| echo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function show-progressbar([int]$actual,[int]$completo,[string]$status,[string]$Activity) | |
| { | |
| $porcentaje=($actual/$completo)*100 | |
| # Si no le pasamos un parametro $Status, pone uno generico | |
| if (!$status){ | |
| $status="Buscando datos $actual de $completo" | |
| } | |
| # Si no le pasamos un parametro $Activity, pone uno generico | |
| if (!$Activity){ | |
| $Activity="Obteniendo Resultados" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ReceiveConnector | where {$_.name -like "relay*"} | select name, @{Expression={$_.remoteipranges.count};Label="cantidad"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ReceiveConnector | where {$_.name -like "relay*"} | Set-ReceiveConnector -RemoteIPRanges $ips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ReceiveConnector | where {$_.name -like "*relay*"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| New-ReceiveConnector -Server SERVIDORTARGET -name "Relay SERVIDORTARGET" -Usage custom -AuthMechanism externalauthoritative -PermissionGroups ExchangeServers -Bindings 0.0.0.0:25 -TransportRole FrontEndTransport -RemoteIPRanges $ips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ips=(Get-ReceiveConnector "SERVIDORBASE\RC-A-COPIAR").remoteipranges |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import-module activedirectory | |
| $ruta=get-location | |
| $prueba=@() | |
| $completo=0 | |
| ## la subred que se quiere buscar | |
| $mascara="172.16.*" | |
| cd "AD:\" | |
| $equipos= Get-ADComputer -Filter {OperatingSystem -like "*server*"} -Properties ipv4address, CanonicalName, operatingsystem | Where-Object {$_.ipv4address -like $mascara} | |
| $total=$equipos.count |
NewerOlder