Solved

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

Posted on 2011-09-07
5
242 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Index Match Vlook up for a master file 7 58
Changing the domain admin password 9 71
Compile Error 7 39
How can I save all open docs into a given folder 12 83
In this guide, I outline 7 key steps to help technology professionals grow their careers. Whether you have been working in technology for 10 years or for 10 days, follow these steps to help you achieve your career goals and pursue your passions.
How can you create a game plan that lets you focus on special projects instead of running from cubicle to cubicle every day and feeling like you’ve accomplished nothing? Try these strategies for prioritizing your tasks, offloading what you can, and …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

11 Experts available now in Live!

Get 1:1 Help Now