PowerShell: Force password change of users in an OU

The following script allows you to force the password change at the next logon.   # Removing the password not expiring Get-ADUser -Filter * -SearchBase “OU=USERS_TEST,DC=lab,DC=intra” | Set-ADUser -PasswordNeverExpires $False # Removed the impossibility to change the password Get-ADUser -Filter * -SearchBase “OU=USERS_TEST,DC=lab,DC=intra” | Set-ADUser -CannotChangePassword $False # We force the change Get-ADUser -Filter * …

Read morePowerShell: Force password change of users in an OU

Alert users to change their password

The following VBS script displays an alert to users at login that the password is soon to expire. The script ‘ Days before to alert user QtDiasAviso = 7 RedirectRdWeb = true UrlRDWEB = “https://monserveur/RDWeb/Pages/fr-FR/password.aspx” Message_alert = “” Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000 Set oTranslate = CreateObject(“NameTranslate”) Set oNetwork = CreateObject(“WScript.Network”) Set wshell = WScript.CreateObject(“WScript.Shell”) oTranslate.Init …

Read moreAlert users to change their password

Google Analytics: track outgoing clicks with jQuery

The script below allows you to track clicks to external links to your website. In addition, I leave you the code to track PNG image openings and zip file downloads. jQuery(‘a’).click(function(){ var linktype = ”; // Get click href attribut var hreflink = jQuery(this).attr(‘href’); var myClass = jQuery(this).attr(“class”); // Debug console.log(‘Link clicked : ‘ + …

Read moreGoogle Analytics: track outgoing clicks with jQuery

Categories Uncategorized

Powershell: Automatically decline ARM64 Updates on WSUS

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 …

Read morePowershell: Automatically decline ARM64 Updates on WSUS

Powershell: Automatically decline Itanium Updates on WSUS

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, …

Read morePowershell: Automatically decline Itanium Updates on WSUS

Vbs: Check if a user is part of a group

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”) …

Read moreVbs: Check if a user is part of a group