Photo Gallery
Member List
Search
Calendars
FAQ
Ticket List
Log Out
Forums
Register
Login
My Profile
Inbox
Address Book
My Subscription
My Forums
Problem with checking objUser.UserFlags
Logged in as: Guest
arrSession:exec spGetSession 2,2,61569
Active Users: There are
0
members and
0
guests.
Users viewing this topic: none
Printable Version
All Forums
>>
[Scripting]
>>
WSH & Client Side VBScript
>> Problem with checking objUser.UserFlags
Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page:
[1]
Login
Message
<< Older Topic
Newer Topic >>
Problem with checking objUser.UserFlags -
6/18/2008 3:13:10 AM
tomas
Posts: 11
Score: 0
Joined: 1/2/2008
Status:
offline
Hi,
I'm trying to check if CN=myuser account is disabled in OU=Users,DC=super,DC=com using vbs;
Const ADS_UF_ACCOUNTDISABLE = &H02 Set objUser = GetObject("LDAP: //CN=myuser, OU=Users,DC=super,DC=com") If objUser.UserFlags AND ADS_UF_ACCOUNTDISABLE Then wscript.echo objUser.FullName & " Account disabled" End If Wscript.Quit
If I run this code I'm getting an error;
Microsoft VBScript runtime error: Object doesn't support this property or method: 'objUser.UserFlags'
Does that mean that there's UserFlags is not supported by my DC or I'm doing this wrong?
Post #: 1
If you found our site useful please link to us
<a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>
.
All Forums
>>
[Scripting]
>>
WSH & Client Side VBScript
>> Problem with checking objUser.UserFlags
Page:
[1]
Jump to:
Select a Forum
All Forums
----------------------
[Welcome]
- - Forum Rules
- - Test Posting Messages
- - New Member Area/Introduction
[Scripting]
- - WSH & Client Side VBScript
- - WSH & Client Side VBScript Tutorial
- - Post a VBScript
- - Windows PowerShell
- - ASP
- - ASP.NET
- - Windows Script Components
[General Forum]
- - Other Programming/Scripting Languages
- - Suggestions & Feedback
- - Off-Topic Lounge
New Messages
No New Messages
Hot Topic w/ New Messages
Hot Topic w/o New Messages
Locked w/ New Messages
Locked w/o New Messages
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
Forum Software ©
ASPPlayground.NET
Advanced Edition
2.5.5 ANSI