
September 4th, 2009, 06:59 AM
|
 |
|
|
Join Date: Jun 2006
Location: Salem, OH
|
|
Quote: | Originally Posted by albadmin Actually it doesn't and this shocked me ! Do i need to do some extra config somewhere ? | Nope. Sounds like someone has suppressed the default message or set Windows to perform a forced shutdown.[/url] Quote: | Originally Posted by albadmin Can u still provide me with some script lines ?!
Thank you | Well, I can try. I've never actually tried to do this before and there's no documented way that I'm aware of. However, if you're using Active Directory, this might work for you.
vb Code:
Original
- vb Code |
|
|
|
' This VBScript code lists the connection objects for a server ' --------------------------------------------------------------- ' From the book "Active Directory Cookbook" by Robbie Allen ' ISBN: 0-596-00466-4 ' --------------------------------------------------------------- ' ------ SCRIPT CONFIGURATION ------ strServer = "<ServerName>" ' e.g. dc01 strSite = "<SiteName>" ' e.g. MySite1 ' ------ END CONFIGURATION --------- set objRootDSE = GetObject("LDAP://RootDSE") set objNTDSCont = GetObject("LDAP://cn=NTDS Settings,cn=" & strServer & _ ",cn=servers,cn=" & strSite & ",cn=sites," & _ objRootDSE.Get("configurationNamingContext") ) objNTDSCont.Filter = Array("ntdsConnection") WScript.Echo "Connection objects for " & strSite & "\" & strServer for each objConn in objNTDSCont if objConn.Get("options") = 0 then Wscript.Echo " " & objConn.Get("cn") & " (MANUAL)" else Wscript.Echo " " & objConn.Get("cn") & " (AUTO)" end if next
|