Press "Enter" to skip to content

Posts published in “Archives: Scripts”

Script IT

WordPress: show similar articles without plugins

0

Introduction In this article, I propose a PHP function to display similar articles on your WordPress site. Following the hacking of the plugin Yuzo Related Post that I used on the site, I finally decided to do without plugin to do that. To have a demo, I invite you to browse the site to see the result. The code In…

Powershell: Automatically decline ARM64 Updates on WSUS

0

The PowerShell script below allows you to automatically decline ARM64 updates from Windows 10 into WSUS. The script can be started manually or by a scheduled task. The script must be running on the WSUS server. Works under: Windows 2012 and 2010R2 Windows 2016 Param( [string]$WsusServer = ([system.net.dns]::GetHostByName('localhost')).hostname, [bool]$UseSSL = $False, [int]$PortNumber = 8530, [bool]$TrialRun = $False, [bool]$EmailLog = $False,…


PRTG: Hyper-V Statistics CPU and RAM Resource Allocation

0

This script creates a sensor in PRTG that displays the allocation of physical resources to virtual machines. Scripts can be used to monitor a standalone / clustered Hyper-V host and / or cluster. Canals : VM Count : number of virtual machines CPU allocated (%) : percentage of logical CPUs allocated to VMs. CPU assigned : number of CPUs assigned…

Powershell: Automatically decline Itanium Updates on WSUS

0

The PowerShell script below allows you to automatically decline Itanium updates in WSUS. The script can be started manually or by a scheduled task. The script must be run on the WSUS server. Works under: Windows 2008 et 2008R2 Windows 2012 et 2010R2 Windows 2016 Param( [string]$WsusServer = ([system.net.dns]::GetHostByName('localhost')).hostname, [bool]$UseSSL = $False, [int]$PortNumber = 8530, [bool]$TrialRun = $False, [bool]$EmailLog =…

Vbs: Check if a user is part of a group

0

The function below is used to check if a user is part of an AD group. The function returns True or False. ' ***************************************************** 'This function checks to see if the passed group name contains the current ' user as a member. Returns True or False Function IsMember(groupName) If IsEmpty(groupListD) then Set groupListD = CreateObject("Scripting.Dictionary") groupListD.CompareMode = 1 ADSPath =…

PowerShell: Running Veeam backups.

0

The PowerShell script below allows you to run a Veeam backup. This type of script can be used with a schedule task to initiate a backup. # Load cmdlet Veeam Add-PSSnapin VeeamPSSnapin # Disconnect old session Disconnect-VBRServer # Connect Veeam Server Connect-VBRServer -User "DOMAIN\administrator" -Password "password" # Get job by Name $bkjob = Get-VBRJob -Name "name of job" # Start…

Vbs: IIS log rotation script

0

Unlike linux, Windows does not have a task for log rotation. Below is a Vbs script that allows you to do this rotation. By adapting the sLogFolder variable, it is possible to run this script for any location where there are log files. '# source : https://docs.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/managing-iis-log-file-storage#delete-old-log-files-by-script sLogFolder = "c:\inetpub\logs\LogFiles" 'Emplacement des logs iMaxAge = 30 'Retention en jours Set…

It looks like you're using an adblocker.
We use ads to keep our content free. Please support us by turning off your adblocker.