Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-09-07
5
Medium Priority
?
249 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Introducing Priority Question, our latest feature.
Article by: Shawn
IT teams define success as solving problems quickly. To enable ITSM modernization we have to think of adopting the tools and methods that will enable resolution of ITSM issues more quickly.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

618 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