Solved

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

Posted on 2006-07-01
3
1,519 Views
Last Modified: 2008-01-09
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
Comment
Question by:dgooderi
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
mdiglio earned 500 total points
ID: 17024939
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
 

Author Comment

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

I should have looked there in the first place.

Thanks
0
 
LVL 16

Expert Comment

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now