Solved

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

Posted on 2011-09-07
5
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBSScript Error IP Array 6 34
Creating An Intelligent Dropdown 8 49
VBA Vbscript  Issue 9 34
VB script to continue despite error 2 58
There's a better way to communicate time sensitive or critical info.
This article was originally published on Monitis Blog, you can check it  here .   Some years back, I worked as the CTO.  During my tenure, I had a head of IT support reporting to me.  He did his job quite well and had a commendable sense of duty…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

697 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