Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

error with CreateObject("ADSystemInfo")

$
0
0

I am having an issue with a vbscript which i am running to retrieve the computer DN from Active Directory.

The desktops are Windows 7 SP1 Pro X64 on a Windows 2008 R2 domain.

When i run the script

Set objSysInfo = CreateObject("ADSystemInfo")
strComputer = objSysInfo.ComputerName
wscript.echo strComputer


I get the following error

C:\Users\xxxx\Desktop\test.vbs(1, 1) Microsoft VBScript runtime error: Object doesn't support this property or method: 'objSysInfo'

Why is this? The computers are joined to the domain and i have tried running it from an account with domain admin privileges as well as standard user privileges. It works on about 20% of the desktops but not others (the ones it doesn't work from i have a feeling all came from the same master image so there may have been an issue with that)


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>