Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Terminal Server Profile Path

Status
Not open for further replies.

swlymer

Programmer
Dec 15, 2004
10
US
Hello, I am trying to write to the Terminalservicesprofilepath attribute in AD but I continue to get the "property not found in the the directory cache" eror. Can someone help? Hee is my code snippet:

adsuserprofile =templuser.GetEx("TerminalServicesProfilepath")
adsUser.TerminalServicesProfilepath = adsuserprofile
adsUser.setinfo


Thanks!!

 
You are probably encountering problems due to the OS you are executing the code on. THe following will work if executed from a Windows 2003 server.

Code:
 Set DSO = GetObject("WinNT:")
Set usr = DSO.OpenDSObject("WinNT://TSPServer/markmac,user", "DomainName\Administrator", "Password", ADS_SECURE_AUTHENTICATION)
Wscript.echo usr.TerminalServicesProfilePath
usr.TerminalServicesProfilePath = "\\servername\shareName"
usr.SetInfo
WScript.echo usr.TerminalServicesProfilePath

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top