Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Shane Clarke,
This function can be used to display the details, in readable format, for UserAccountControl key. It is useful when you need to display the status for user data imported from Active Directory based on the UserAccountControl number.
General outline on implementation:
How to use function:
SELECT [dbo].[fn_AD_UserAccountControlDetails] (514) as TestControlDetails
Returns: NORMAL_ACCOUNT, ACCOUNTDISABLE
-- The function can be be used combined with any table that contains UserAccountControl data
SELECT [Flag] ,[Details],[dbo].[fn_AD_UserAccountControlDetails] (flag) as UserStatus
Comments posted to this topic are about the item [B]Function to convert UserAccountControl number to...
Rownumber function for the detail of every group
Using OVER clause with ROW_NUMBER() function to get top ranked employee detail as per each departmen...
The DAX function documentation in MSDN can be found on separate pages, organized by function catego...