M
Michael Howes
This MSDN article
http://msdn2.microsoft.com/en-us/library/ms180913(vs.80).aspx
and this codeproject article
http://www.codeproject.com/useritems/everythingInAD.asp
both show the same c# code for enabling and disabling active directory
accounts.
I'm trying to do that to a local user account and it's not working
the "userAccountControl" Property is null on my user.
this code fales because that property doesn't exist on my local user
DirectoryEntry user = new DirectoryEntry(member);
val = (int)user.Properties["userAccountControl"].Value;
the user I'm trying to do this to is not a domain user, the account is
local to the machine.
any ideas?
thanks
mike
PS I looped through the properties of my user and saw these;
"UserFlags"
"MaxStorage"
"PasswordAge"
"PasswordExpired"
"LoginHours"
"FullName"
"Description"
"BadPasswordAttempts"
"LastLogin"
"HomeDirectory"
"LoginScript"
"Profile"
"HomeDirDrive"
"Parameters"
"PrimaryGroupID"
"Name"
"MinPasswordLength"
"MaxPasswordAge"
"MinPasswordAge"
"PasswordHistoryLength"
"AutoUnlockInterval"
"LockoutObservationInterval"
"MaxBadPasswordsAllowed"
"RasPermissions"
"objectSid"
http://msdn2.microsoft.com/en-us/library/ms180913(vs.80).aspx
and this codeproject article
http://www.codeproject.com/useritems/everythingInAD.asp
both show the same c# code for enabling and disabling active directory
accounts.
I'm trying to do that to a local user account and it's not working
the "userAccountControl" Property is null on my user.
this code fales because that property doesn't exist on my local user
DirectoryEntry user = new DirectoryEntry(member);
val = (int)user.Properties["userAccountControl"].Value;
the user I'm trying to do this to is not a domain user, the account is
local to the machine.
any ideas?
thanks
mike
PS I looped through the properties of my user and saw these;
"UserFlags"
"MaxStorage"
"PasswordAge"
"PasswordExpired"
"LoginHours"
"FullName"
"Description"
"BadPasswordAttempts"
"LastLogin"
"HomeDirectory"
"LoginScript"
"Profile"
"HomeDirDrive"
"Parameters"
"PrimaryGroupID"
"Name"
"MinPasswordLength"
"MaxPasswordAge"
"MinPasswordAge"
"PasswordHistoryLength"
"AutoUnlockInterval"
"LockoutObservationInterval"
"MaxBadPasswordsAllowed"
"RasPermissions"
"objectSid"