WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Terminal Server Properties


Question:

I'm looking for some terminal server property names as following.
  • terminal server profile path
  • terminal server home directory
  • terminal server home drive
We are working with a windows 2003 ADS. Can anyone tell me this property names for using dsGetProperty()?

Answer:

I don't think you can use the ADSI extender to get at these properties.

So you will need to use COM instead of the extender and yes you can mix the extender and COM in the same script. Here is a COM example that obtains the information you mentioned


objDs = ObjectGet("LDAP:")
objUser = objDs.OpenDSObject("LDAP://CN=Homer Simpson,CN=Users,DC=jclass,DC=org", "guesswho", "*secret*", 1)


sPath  = objUser.TerminalServicesProfilePath
sDir   = objUser.TerminalServicesHomeDirectory
sDrive = objUser.TerminalServicesHomeDrive

; Display the results
sText  = StrCat("TerminalServicesProfilePath:", sPath, @CRLF)
sText  = StrCat(sText, "TerminalServicesHomeDirectory:", sDir, @CRLF)
sText  = StrCat(sText, "TerminalServicesHomeDrive:", sDrive )

Message("Terminal Server Properties", sText)

Article ID:   W16810
File Created: 2008:11:18:11:45:54
Last Updated: 2008:11:18:11:45:54