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

Posted on 2006-07-01
Last Modified: 2008-01-09

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?
Question by:dgooderi
  • 2
LVL 16

Accepted Solution

mdiglio earned 500 total points
ID: 17024939
This solution came from the folowing website:

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

Set objUser = GetObject _
    ("LDAP://cn=Ken Myer,ou=Finance,dc=fabrikam,dc=com")
objUser.PutEx ADS_PROPERTY_CLEAR, "userWorkstations", 0

Author Comment

ID: 17025095
Fantastic and prompt answer - Worked first time.

I should have looked there in the first place.

LVL 16

Expert Comment

ID: 17027007
Glad it worked for you!
Thanks for the points

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reduce vmdk file & unallocated windows partion 12 81
Dcdiag failures on some of my domain controllers 12 72
Best practice DHCP migration 7 69
Server Login Issue 4 58
So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question