[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1574
  • Last Modified:

ADSI - How do I set the user property userworkstations to allow logins to all computers.

Hi,

I have come training users restricted to thetraiing computers only but this had caused problems with Citrix which I have not been able to solve.

I need to remove the computers from the userworkstation property but if I try to set it to "" or null I get an error.

I'm using   objUser.Put "userWorkStations", Null

Using objUser.Put "userWorkStations", "computer1,computer2" works fine

Any Ideas?
0
dgooderi
Asked:
dgooderi
  • 2
1 Solution
 
mdiglioCommented:
Hello,
This solution came from the folowing website:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/feb06/hey0217.mspx

you'll have to modify line 4 ( begins w/ ldap ) line to fit your environment


Const ADS_PROPERTY_CLEAR = 1
 
Set objUser = GetObject _
    ("LDAP://cn=Ken Myer,ou=Finance,dc=fabrikam,dc=com")
 
objUser.PutEx ADS_PROPERTY_CLEAR, "userWorkstations", 0
objUser.SetInfo
0
 
dgooderiAuthor Commented:
Fantastic and prompt answer - Worked first time.

I should have looked there in the first place.

Thanks
0
 
mdiglioCommented:
Glad it worked for you!
Thanks for the points
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now