Tuesday, March 31, 2009

some more user account control AD

http://rmanimaran.wordpress.com/2008/07/08/activedirectory-useraccountcontrol-flag/
' Bit mask for "Password cannot change"
Const ADS_UF_PASSWD_CANT_CHANGE = &H40

' Bind to user object.
Set objUser = GetObject("LDAP://cn=Jim Smith,ou=Sales,dc=MyDomain,dc=com")

' Retrieve value of userAccountControl attribute.
lngFlag = objUser.userAccountControl

' Check if "Password cannot change" bit is set.
If (lngFlag AND ADS_UF_PASSWD_CANT_CHANGE) <> 0 Then
' Toggle the bit to turn it off.
lngFlag = lngFlag XOR ADS_UF_PASSWD_CANT_CHANGE
' Save changes.
objUser.SetInfo
End If
============
You AND the value of userAccountControl with the bit mask to test if it is
set. Any non-zero result means the bit is set. Zero means the bit is not
set. You OR the value of userAccountControl with the bit mask to set the
bit. You XOR userAccountControl with the bit mask to toggle the bit, which
is the only way to turn it off.

Note, there is also a bit of userAccountControl for "Don't expire password".
The bit mask is &H10000. Also, you can remove permissions for the user to
change their password. The code to restore these permissions is more
complex.

update useraccount control in AD c#

http://msdn.microsoft.com/en-us/library/ms180916(VS.80).aspx

Saturday, March 28, 2009

DataTable.Select does not have distinct option

http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/1951e862-4732-4f17-9432-a09dfa4bbffa/

Monday, March 23, 2009

Powershell in AD

http://www.powershellpro.com/powershell-tutorial-introduction/powershell-tutorial-active-directory/

Wednesday, March 18, 2009

TFS Bug sync

This tool helps in synchronizing QC 9.2 bugs into TFS.
http://onroad.juvander.fi/Community/blogs/news/archive/2008/02/24/released-tfs-bug-item-synchronizer-1-4-for-quality-center.aspx

TFS Build

Branch by Quality.
Post Build Activities -
1. Team Build current project in TFS... e.g. Build Source
2. Right click on Build Source folder
a. Apply Label
3. Right click on Build Source folder,
a. Branch
b. Set location as Release folder
3. If there is a bug in QA,
a. Goto Released folder, make changes to build with the latest build number
b. Change TFS Build path to Release folder
c. Make Team Build and release to QA
d. Merge changes of Released folder with actual Build Source folder.