Example: Create a protected account, get its configuration from the server, modify its configuration and upload its new configuration
string userAccount = "DOMAIN\\UserName";
if (!userLockServer.DoesProtectedAccountExist(userAccount))
{
if (!userLockServer.AddProtectedUser(userAccount))
throw new Exception(userLockServer.Connection.LastMessage);
}
ProtectedAccount protectedAccount = userLockServer.GetProtectedAccount(userAccount);
protectedAccount.ExceptTimeFramesNew = 0;
TimeFrame timeFrame = new TimeFrame();
timeFrame.DaysOfWeek = TimeFrame.WeekDays.Monday | TimeFrame.WeekDays.Tuesday;
timeFrame.MinutesFrom = 8 * 60;
timeFrame.MinutesTo = 18 * 60;
protectedAccount.TimeFrames.Clear();
protectedAccount.TimeFrames.Add(timeFrame);
protectedAccount.ExpirationActionNew = ProtectedAccount.ExpirationActionEnum.Logoff;
protectedAccount.TimeCountdown = 5;
TimeQuota timeQuota = new TimeQuota();
timeQuota.Periodicity = TimeQuota.Period.Day;
timeQuota.TimeLength = new TimeSpan(3, 0, 0);
protectedAccount.TimeQuotas.Clear();
protectedAccount.TimeQuotas.Add(timeQuota);
protectedAccount.EnabledTimeQuotas = true;
protectedAccount.SetInfo();
SessionType
Different types of sessions. A session has only one type but several types can be specified in severa...
Definition Session.cs:11