Test Passwords Against Active Directory User

Tool to test password against Active Directory user. Multiple passwords can be tested by ; separating them


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.DirectoryServices.AccountManagement;
using System.Diagnostics;

namespace CheckCredentials
    class Program
        static void Main(string[] args)
            if (args.GetUpperBound(0) == 2)
                foreach (string password in args[2].Split(';'))
                    using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, args[0]))

                        // validate the credentials
                        bool isValid = pc.ValidateCredentials(args[1], password);

                        if (isValid)
                            Console.WriteLine(@"{1}@{0} has password {2}", args[0], args[1], password);

                Console.WriteLine("Usage:{0} FQDN USERNAME PASSWORD1[;PASSWORD2;PASSWORD3..]", Process.GetCurrentProcess().ProcessName + ".exe");


View Shaun Vermaak's profile on LinkedIn

Non-standard success exit codes

Some software distribution tools do not allow custom success exit codes. This means that if a software package returns a non-standard success exit code that the deployment status might return a failure instead of a success.

With this script an installation package’s non-standard success exit codes can be translated to exit code 0 within the software distribution tool.

Example: CScript.exe Setup.vbs /Command:SomeSetup.exe /SuccessCodes:1;2;3
In this example exit code 1,2 and 3 for SomeSetup.exe will be changed to 0


Option Explicit

On Error Resume Next

Dim strCommand
Dim strSuccessCodes

strCommand = WScript.Arguments.Named("Command")
strSuccessCodes = WScript.Arguments.Named("SuccessCodes")

If Len(Trim(strCommand)) = 0 Or Len(Trim(strSuccessCodes)) = 0 Then
End If

Dim arrSuccessCodes
Dim intSuccessCode

arrSuccessCodes = Split(strSuccessCodes,";")

Dim objShell
Dim objExec
Dim intReturnCode

Set objShell = CreateObject("WScript.Shell")

Set objExec = objShell.Exec(strCommand)
If Err.Number <> 0 Then
    WScript.Echo "Problem with command"
End If

Do While objExec.Status = 0
    Call WScript.Sleep(100)

intReturnCode = objExec.ExitCode

For Each intSuccessCode In arrSuccessCodes
    If IsNumeric(intSuccessCode) Then
        If intReturnCode = CInt(intSuccessCode) Then
            WScript.Echo "Success"
            intReturnCode = 0
            Exit For
        End If
    End If

Set objExec = Nothing
Set objShell = Nothing

Call WScript.Quit(intReturnCode)


This utility can be used to recreate any file at runtime.

It works by reading the input file with binaryreader and creates a function that can be called to recreate the input file.

Usage: CreateFileWithCode INPUTFILE > OUTPUTFILE


Private Sub CreateFile()
        Dim objBinaryWriter As System.IO.BinaryWriter
        objBinaryWriter = New System.IO.BinaryWriter(System.IO.File.Open("CreateFileWithCode.exe", System.IO.FileMode.Create))
        Dim intValue As Int32
        Dim arrValues() As Int32 = { _
        9460301, _
        3, _
        4, _
        65535, _
        184, _
        0, _
        64, _
        0, _
        0, _
        0, _
        0, _
        0, _
        0, _
        0, _
        0, _
        128, _
        247078670, _
        -855002112, _
        1275181089, _

        0 _
        For Each intValue In arrValues
    Catch ex As Exception
    End Try
End Sub

Command Prompt with Random Color on Startup

Add REG_SZ to HKLM\SOFTWARE\Microsoft\Command Processor with name AutoRun and value of RndColor.bat

Create file RndColor.bat in %WINDIR%\System32

@Echo Off
Echo Loading...

SET rnd=%random%

IF %rnd% LSS 4681 GOTO 1
IF %rnd% LSS 9362 GOTO 2
IF %rnd% LSS 14043 GOTO 3
IF %rnd% LSS 18724 GOTO 4
IF %rnd% LSS 23405 GOTO 5
IF %rnd% LSS 28086 GOTO 6
IF %rnd% LSS 32767 GOTO 7

Goto END

Color 1F
Goto END

Color 20
Goto END

Color 30
Goto END

Color 4E
Goto END

Color 5F
Goto END

Color 80
Goto END

Color 4F
Goto END



This app will parse the output of “RepAdmin.exe /ShowRepl *” and display a unique list of all the servers with errors

  1. First create OUT.TXT with the following command:
  2. RepAdmin.exe /ShowRepl * > OUT.TXT
  3. Then run the following to get all errors from OUT.TXT
  4. ShowReplParser.exe OUT.TXT


Updated WSUS_Get_Status

Warning: count(): Parameter must be an array or an object that implements Countable in H:\root\home\svermaak-001\www\ITtelligenceBlog\wp-content\plugins\list-attachments-shortcode\list-attachments-shortcode.php on line 123

WSUS_Get_Status by Shaun Vermaak is an utility to get the UpdatesNeedingFilesCount value from a remote WSUS server…
Remember to have “Microsoft.UpdateServices.Administration.dll” in path

Added last sync status