This file contains 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
############################################################## | |
#SCRIPT CIERRE SESIONES USUARIOS EN CITRIX (TAREA PROGRAMADA)# | |
############# Raúl Unzué - 27/02/2019 ####################### | |
#################### EL BLOG DE NEGU ######################### | |
# https://www.maquinasvirtuales.eu/cerrar-sesion-de-usuarios-citrix-con-tarea-programada-y-powershell/# | |
############################################################## | |
################################## | |
# SOBRE EL CONTROLADOR DE DOMINIO | |
################################## | |
# Abrir una sesión persistente y la guardamos en una variable $ConAD |
This file contains 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
############################################################################## | |
############## | |
############# Script Raúl para el Blog de Negu - 24062018 | |
############# https://www.maquinasvirtuales.eu/script-matar-procesos-libreoffice/ | |
############ Parar procesos con más de 60 segundos en memoria | |
############################################################################## | |
# Clear-Host | |
# Cargamos una variable con la hora menos 60 segundos | |
$60Segundos = (Get-Date).AddSeconds(-60) | |
# Cargamos variable con el cmd más antiguo en memoria |
This file contains 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
# EL BLOG DE NEGU | |
# https://www.maquinasvirtuales.eu/script-linux-para-revisar-usuarios-conectados/ | |
#! /bin/sh | |
# Descubrimos la cantidad de usuarios conectados | |
uconn=`who | wc -l | sed 's/^ *//g'` | |
# Cantidad de usuarios reales | |
ureal=`who | cut -f1 -d ' ' | sort -u | wc -l | sed 's/^ *//g'` | |
# Mostramos en pantalla todos los usuarios con el numero de veces que estan conectados |
This file contains 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
# EL BLOG DE NEGU | |
# https://www.maquinasvirtuales.eu/ejemplo-de-script-con-vmware-powercli/ | |
## Obtenemos el nombre del servidor | |
param( [string] $vCenter, [string] $vSwitch_Name, [string] $PortGroup_Nombre, [string] $PortGroup_vlanid) | |
## Cargamos las "librerias" de VMware | |
add-pssnapin VMware.VimAutomation.Core | |
if (($vCenter -eq "") -or($vSwitch_Name -eq "") -or($PortGroup_Nombre -eq "") -or ($PortGroup_vlanid -eq "")){ | |
Write-Host |
This file contains 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
########################################### | |
####### RAUL UNZUE - ELBLOGDENEGU ######### | |
########################################### | |
########## Script cambio owner ############ | |
########################################### | |
# https://www.maquinasvirtuales.eu/script-powershell-para-cambiar-owner-carpetas-y-archivos/ | |
# EMPEZAMOS LOG: | |
Start-Transcript ("c:\temp\logs\OWNER-ScriptLog{0:yyyyMMdd-HHmm}.txt" -f (Get-Date)) |
This file contains 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
# Script ElBlogdeNegu de Raúl Unzué | |
# Se recorre el escritorio de perfiles FSLogix y UPM buscando ficheros WS | |
# Si no hay ficheros WS genera un fichero en blanco | |
# https://www.maquinasvirtuales.eu/powershell-script-busqueda-de-ficheros-en-perfiles-citrix/ | |
# SABER EL USUARIO | |
$usuario=C:\windows\system32\whoami.exe | |
# ELIMINAR DOMINIO PARA LIMPIAR NOMBRE | |
$usuariomodificado=$usuario.Substring(8) |
This file contains 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-WMIObject -Class Win32_LogicalDisk | Where-Object {$_.DriveType -eq 3} ` | |
| Select-Object @{n="Unidad";e={($_.Name)}}, | |
@{n="Etiqueta";e={($_.VolumeName)}}, | |
@{n='Tamaño (GB)';e={"{0:n2}" -f ($_.size/1gb)}}, | |
@{n='Libre (GB)';e={"{0:n2}" -f ($_.freespace/1gb)}}, | |
@{n='% Libre';e={"{0:n2}" -f ($_.freespace/$_.size*100)}} |
This file contains 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
#!/bin/bash | |
###################################################### | |
# Zabbix-Telegram envio de alerta por Telegram | |
# Date: 01/05/2020 | |
# Script Raul Unzue - https://www.maquinasvirtuales.eu | |
###################################################### | |
MAIN_DIRECTORY="/usr/local/share/zabbix/alertscripts" | |
# To enable the debug set here path of file, otherwise set /dev/null |
This file contains 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
# Este script cierra todas las sesiones RDS | |
$fecha = get-date -format yyyy-MM-dd_HH-mm | |
$log_file = "C:\scripts\logs\Cierre_Sesiones-$fecha.txt" | |
# Cargamos las sesiones del servidor, tanto activas como desconectadas | |
$sesiones = Get-RDUserSession | |
foreach ($sesion in $sesiones) | |
{ | |
# Mata el número de sesión ID en el servidor en el que se encuentre la sesión actual del bucle |
This file contains 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
# Ejemplo Job Simple | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: ebdn-cuenta | |
spec: | |
template: | |
metadata: | |
name: ebdn-cuenta | |
spec: |
OlderNewer