Solved

Please Help!! I have to modify a VBscript to take into considaration Domain Controller

Posted on 2011-09-07
5
241 Views
Last Modified: 2012-05-12
Hello Below is a VBscript i have to modify so that it will also take into considaration Domain controllers that are DFS i think below is the part of code i need to modify
But i wonder if just putting "True instead of False" will work
Case "dfs"
        If IsDC = False Then
                    WshShell.run "cscript " & strFolder & "Backup_DFS.vbs",0,True
                     OutputFile.WriteLine(sDate & " ##### Found DFS service started on server")

Should i also modify the "Function Im_a_DC()" part ?
The script calls another script called "Backup_DFS.vbs" which does the DFS backup
but i don't think i need to touch that one do I ?

THANKS!!!!
Backup-DS-Servers.txt
0
Comment
Question by:LI20579
  • 3
  • 2
5 Comments
 
LVL 18

Accepted Solution

by:
x-men earned 500 total points
ID: 36494313
Case "dfs"
                    WshShell.run "cscript " & strFolder & "Backup_DFS.vbs",0,True
                     OutputFile.WriteLine(sDate & " ##### Found DFS service started on server")

0
 

Author Comment

by:LI20579
ID: 36494344
Ok thx what about the

                      End If
      End Select
End If

how do i end ??? to get to the next part ??

THX
0
 
LVL 18

Expert Comment

by:x-men
ID: 36494427
since the "If IsDC..." was removed, remove the first "End If"

...
Case "dfs"
                 ...
End Select
...
0
 

Author Comment

by:LI20579
ID: 36494532
It's ok i got it
Thanks a lot X-MEN!!!!
0
 

Author Closing Comment

by:LI20579
ID: 36494555
Thanks!!!!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Communication between departments might not happen in two different languages, but they do exist in two different worlds. With different targets and performance goals the same phrase often means something completely different to each party. Learn ho…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now