Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  List  Trust  Relationships  

 Content of List Trust Relationships.vbs
MD5 Hash: EFAE362B94D3E28F93E2BA0F81FCB44E
' Description: Enumerates trust relationships.


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\MicrosoftActiveDirectory")

Set colTrustList = objWMIService.ExecQuery _
("Select * from Microsoft_DomainTrustStatus")

For each objTrust in colTrustList
Wscript.Echo "Trusted domain: " & objTrust.TrustedDomain
Wscript.Echo "Trust direction: " & objTrust.TrustDirection
Wscript.Echo "Trust type: " & objTrust.TrustType
Wscript.Echo "Trust attributes: " & objTrust.TrustAttributes
Wscript.Echo "Trusted domain controller name: " & objTrust.TrustedDCName
Wscript.Echo "Trust status: " & objTrust.TrustStatus
Wscript.Echo "Trust is OK: " & objTrust.TrustIsOK
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a