Kixstart script

I need help to find what this script is doing:

Thank you
===================================================

; ; == Return the Name and AdsPath of all users ===================  
$_=SetOption("WrapAtEOL","On")
Break on

Call "\\Mydomain.corp\NETLOGON\HQ\Scripts\aos\Library\MyTools.kix"
Call "\\Mydomain.corp\NETLOGON\HQ\Scripts\aos\Library\MyMachine.kix"
Call "\\Mydomain.corp\NETLOGON\HQ\Scripts\aos\Library\MyAD.kix"


$HQDCs="DomainController01.Mydomain.corp","DomainController02.Mydomain.corp","DomainController03.Mydomain.corp","DomainController04.Mydomain.corp"
$aAttributes = "Name", "AdsPath"  
$sADsPath = "LDAP://DomainController01.Mydomain.corp"
;$sADsPath = "LDAP://"+GetObject("LDAP://rootDSE").Get("defaultNamingContext")  
$strFilter = "(&(objectCategory=Person)(sAMAccountName=svcPatchMGR))"  
  


for each $item in $HQDCs
      $sADsPath="LDAP://"+$item
      $aResults = fnLDAPQuery($aAttributes,$sADsPath,$strFilter,"Name")
      
      if ubound($aResults,2)<1
            ?"LDAP is down on "+$item
            
            $to="bb@@Mydomain.com,kk@@Mydomain.com,ss@@Mydomain.com"
            $from="SystemCheck@@Mydomain.com"
            $Subject="AD on "+$item+" is down"
            $Body="The ldap_check test failed for "+$item+".  Unable to authenticate as "+@userid+"."
            $_=SendMail($to,$From, $subject, $body)
            
            $error=1

      else
            ?"LDAP is running on "+$item
      endif
      $aResults=""
next

if $error<>1 and @time>"08:29:00" and @time<"08:40:00"
      $to="bb@@Mydomain.com,kk@@Mydomain.com,ss@@Mydomain.com"
      $from="SystemCheck@@Mydomain.com"
      $Subject="No problem in HQ -Morning"
      $Body="Move on.  Nothing to see here."
      $_=SendMail($to,$From, $subject, $body)
endif

if $error<>1 and @time>"14:29:00" and @time<"14:40:00"
      $to="bb@@Mydomain.com,kk@@Mydomain.com,ss@@Mydomain.com"
      $from="SystemCheck@@Mydomain.com"
      $Subject="No Problem in HQ - Noon"
      $Body="Move on.  Nothing to see here."
      $_=SendMail($to,$From, $subject, $body)
endif

Open in new window


(EDIT code within tags @tagit Topic Advisor)
jskfanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

KimputerCommented:
Missing code for three files:

MyTools.kix
MyMachine.kix
MyAD.kix

These things also do some stuff which I cannot tell you now.

The rest of the code checks all AD servers, and if NO error AND between 8.29 and 8.40 or between 14.29 and 14.40, it will send out an email telling there's NO problem.
If there is an error with an AD controller, no matter what, it will send an email alert.
0
jskfanAuthor Commented:
Ok thanks...
I will try to attach the other 3 scripts
0
jskfanAuthor Commented:
I have attached the files that the script above Called

Thank you for your time
MyAD.txt
MyMachine.txt
MyTools.txt
0
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

KimputerCommented:
Okay, those 3 files hold functions, only one or two are used in the main script. So the answer is what I said in my last reply.
0
RobOwner (Aidellio)Commented:
Like i've said here: http:Q_28271697.html, you should get a paid professional in to do a security analysis on your system.  The scripts are modifying registry settings on the computers (looks ok but I'm not going to guarantee that) as well as installing VNC with a security key that your terminated employee may still have access to, therefore giving him access to any computer in your network.

In other words, it is possible that the terminated employee has access to every machine as well as other sensitive company information such as program installation codes, windows keys etc.  

You need to determine your risk and exposure.  If it were me, I'd be getting a 3rd party in to do a risk assessment and decide on a course of action to take.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jskfanAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.