Hi, next time use [ code ] tags,
I've converted your code to kix however it will not work because some functions are not defined such ass "CCur" and "DateDiff" in the original code.

 Code:
;set variables
Dim $objConnection, $objCommand, $objRootDSE, $strDNsndgov, $strDNgsvbs
Dim $strFilter, $strQuery, $objRecordSet, $objArgs
Dim $objShell, $WSHNetwork, $strStatus, $IE

Dim $objUserGSVBS, $objUserGSVBS, $oldpasswd, $newpasswd, $userstring
$wshYes = 6
$wshNo = 7
$wshYesNoDialog = 4
$wshQuestionMark = 32

$objShell = CreateObject("Wscript.Shell")
$WSHShell = CreateObject("WScript.Shell")
$WSHNetwork = CreateObject("WScript.Network")
;$userstring = $WSHNetwork.UserName
$userstring = "test_cfb"

;Connect to AD
$objConnection = CreateObject("ADODB.Connection")
$objCommand = CreateObject("ADODB.Command")
$objConnection.Provider = "ADsDSOOBject"
$objConnection.Open("Active Directory Provider")
$objCommand.ActiveConnection = $objConnection
;$strBase = "<LDAP://rintra.ruag.com>"
$strBase = "<LDAP://tsb.ruag.com>"

;Set Filter to samAccountName
$strFilter = "(+(objectCategory=person)(objectClass=user)(sAMAccountName=" + $userstring + "))"

;Set Attribute to DN
$strAttributes = "distinguishedName,sn,GivenName"

;Find DN
$strQuery = $strBase + ";" + $strFilter + ";" + $strAttributes + ";subtree"
$objCommand.CommandText = $strQuery
$objCommand.Properties("Page Size").Value = 99999
$objCommand.Properties("Timeout").Value = 300
$objCommand.Properties("Cache Results").Value = 0
$objRecordSet = $objCommand.Execute
$objRecordSet.MoveFirst
Do Until $objRecordSet.EOF
  $strDNsndgov = $objRecordSet.Fields("distinguishedName").Value
  $strDNname = $objRecordSet.Fields("sn").Value
  $strDNvorname = $objRecordSet.Fields("GivenName").Value
  $objRecordSet.MoveNext
Loop


;========================================
; First, get the domain policy.
;========================================
Dim $oDomain
Dim $oUser
Dim $maxPwdAge
Dim $numDays
Dim $pass_last_change, $pass_expire

;wscript.echo $strDNsndgov
;$strDomainDN = "RINTRA.RUAG.COM"
$strDomainDN = "TSB.RUAG.COM"
$strUserDN = $strDomainDN + "/" + $strDNsndgov
? $strUserDN

$oDomain = GetObject("LDAP://" + $strDomainDN)
$maxPwdAge = $oDomain.Get("maxPwdAge")

;========================================
; Calculate the number of days that are
; held in this value.
;========================================
$numDays = CCur(($maxPwdAge.HighPart * 2 ^ 32) + $maxPwdAge.LowPart) / CCur(-864000000000)
? "Maximum Password Age: " + $numDays

;========================================
; Determine the last time that the user
; changed his or her password.
;========================================
$oUser = GetObject("LDAP://" + $strUserDN)

;========================================
; Add the number of days to the last time
; the password was set.
;========================================
$whenPasswordExpires = DateAdd("d", $numDays, $oUser.PasswordLastChanged)

;? "Password Last Changed: " + $oUser.PasswordLastChanged
;? "Password Expires On: " + $whenPasswordExpires
$pass_last_change = FormatDateTime($oUser.PasswordLastChanged, 2)
$pass_expire = FormatDateTime($whenPasswordExpires, 2)
? "Password Expires On: " + $pass_expire
$datum = DateDiff("d",now,$pass_expire)
? $datum
If $datum < 13
  ? "Password expires in Days: " + DateDiff("d",now,$pass_expire)
  Exit 1
Else
  ? "Passwort noch nicht unter 12 Tagen"
  Exit 0
EndIf

;========================================
; Clean up.
;========================================
$oUser = ""
$maxPwdAge = ""

;Close AD Connection
$objConnection.Close

;Clear Variables
$objConnection = ""
$objCommand = ""
$objRootDSE = ""
$objRecordSet = ""