设置 logonHours 属性以锁定解锁用户帐户
如何将 logonHours 属性的每一位(21 字节)设置为 0(用于锁定用户帐户)或 1(用于解锁)?我已经获得了 logonHours 属性(以字节为单位),如下所示:
bytes[] logonHours = (byte[])de.Properties["logonHours"].Value;
How do I set each bit of the logonHours property (which as 21 bytes) to either zero (for locking user account) or one (for unlocking) ? I have obtained the logonHours property in bytes as follows:
bytes[] logonHours = (byte[])de.Properties["logonHours"].Value;
//在网上搜索后,我使用了以下代码:
static class MyExtension
{
}
//After seaching the web, I used the following code :
static class MyExtension
{
}