ciphermethod.com

Scripts

Parallels Windows 11 Pro

by on Jan.26, 2025, under Scripts, Windows

Message: “Your version of Windows has reached the end of service.” 

In order to Force Windows 11 24H2 Feature Update, follow the instructions below:

  1. Open the Local Group Policy via the start menu, or run “gpedit.msc”.
  2. Expand “Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update -> Manage updates offered from Windows Update”
  3. Open “Select the target Feature Update version”
  4. Set option to “Enabled”
  5. Set the first field (Which Windows product version would you like to receive feature updates for), to “Windows 11”
  6. Set the second field “Target Version for Feature Updates” to “24H2”.
  7. Click Apply, click Ok, and then exit Group Policy Editor.
  8. Run “gpupdate /force”, or reboot, to force the system to see the settings.
  9. Check Windows Update for new updates, you should now see the update available.

If gpedit is not installed:

  1. Use notepad to create a text file with the following and save to Desktop as gpedit-install.bat.
    • @echo off pushd "%~dp0"
    • dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~*.mum >gpedit-install.txt
    • dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~*.mum >>gpedit-install.txt
    • for /f %%i in ('findstr /i . gpedit-install.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
    • pause
  2. Right click gpedit-install.bat on desktop and click “Runs as administrator” to install gpedit.
  3. In search field type gpedit.msc and enter to run.
Leave a Comment more...


Script: jbcleanup.sh

by on Oct.24, 2014, under Linux, Scripts


#!/bin/sh
# 20141024 - Jamey Hopkins
echo "Before: `ls *log* | wc -l` Files at `du -h . | cut -f1`"
[ 0 -ne `find *server.log -mtime +9 | wc -l` ] && find *server.log -mtime +9 | xargs gzip -v
[ 0 -ne `find *server.log.gz -mtime +30 | wc -l` ] && find *server.log.gz -mtime +30 | xargs rm
echo "After : `ls *log* | wc -l` Files at `du -h . | cut -f1`"

Leave a Comment more...

Script: 90DayUnlocked.ksh

by on Feb.19, 2014, under AIX, Scripts


#!/bin/ksh
# 90 Day/Account Unlocked user check
# 2014 Feb 14 - Jamey Hopkins
# check if account password has not changed in > 90 days and is not locked
# 20140219 JAH - Updated to exclude locked accounts/cleaned up output

echo; echo "Password Change > 90 Days and Account NOT Locked on `uname -n | tr "[a-z]" "[A-Z]"`"
for USER in $(cut -f1 -d":" /etc/passwd | grep -v "+")
do
   LASTCH=`pwdadm -q $USER | awk '/lastupdate/ {FS="="; print $3}'`
   LASTCH_HR=`perl -e "print scalar localtime($LASTCH);"`
   if [[ ! -z $LASTCH ]]; then
      EPOCH=`perl -e 'print time'`
      let PWAGE="$EPOCH - $LASTCH"
      # 7776000 seconds = 90 days
      if [[ $PWAGE -gt 7776000 ]] ; then
         LOCKED=`lsuser -a account_locked $USER | cut -f2 -d= | xargs echo`
         [ "$LOCKED" = "false" ] && echo "$LASTCH_HR: $USER"
      fi
   fi
done
echo

Leave a Comment more...

20140218: qpurge.sh

by on Feb.18, 2014, under Linux, Scripts


#!/bin/bash

# Created 20131119 by Jamey Hopkins
# Cancel all jobs older than X days.
#
# Example: qpurge.sh 1 will cancel jobs older than prior day
# qpurge.sh 0 will cancel jobs older than current day
# Note: Use a regular cancel -a to cancel all jobs.
# 20131217 JAH – Display before and after counts.
# – Echo Checking queues and canceling job #.
# – Check for at least 2 files. There should be a control file and at least 1 data.
# 20140114 JAH – Exit if lpstat not found.
# 20140124 JAH – Strip preceding zeroes in job id
# 20140218 JAH – Added section for a plain cancel -a of specific queues
#

if [ “$1” = “” ]; then
   echo Enter days to cancel.
   echo Example: qpurge 1
   exit 1
fi

if [ `id -un` != “root” ]; then
   echo “Need to be root.”
   exit 1
fi

if [ ! `which lpstat` ]; then
   exit 1
fi

X=$1

echo “Checking queues…”

BEFORE=`lpstat -o | wc -l`

# cancel all jobs for specific queues here
#CA=”q1 q2 q3″
if [ -n “$CA” ]; then
   echo “Canceling all jobs on: $CA”
   cancel -a $CA >/dev/null 2>&1
fi

# clear jobs by age
find /var/spool/cups/d* -daystart -mtime +$X >qpurge.tmp 2>/dev/null
for FILE in `cat qpurge.tmp`
do
   JOB=`basename $FILE | sed ‘s/d//g’ | cut -f1 -d-`
   # strip preceding zeroes
   JOB=`echo $JOB | sed ‘s/^0*//’`
   INQ=””;INQ=`lpstat -o | grep — “-$JOB”`
   if [ ! -e c${JOB}* -a “$INQ” != “” ]; then
      echo Canceling $JOB
      cancel $JOB >/dev/null 2>&1
   fi
done

AFTER=`lpstat -o | wc -l`
echo;echo “Jobs Remaining ($AFTER of $BEFORE):”
lpstat -o

rm qpurge.tmp

echo

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...