Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1556
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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