UserLock API
|
Instance of a local or remote UserLock server. More...
Inherits IDisposable, IDisposable, and IDisposable.
Classes | |
interface | IOperationNotify |
Interface for callback classes used in ExecuteOperation. More... | |
interface | IOperationParams |
Interface base to operation params in ExecuteOperation method. More... | |
class | SendPopupParams |
Parameters to send popup operation. More... | |
class | ShutdownParams |
Parameters to shutdown operation. More... | |
class | Statistic |
Represents a statistic element. More... | |
class | TaskAsync |
Represents an asynchornous task element. More... | |
class | TaskAsyncResult |
Represents an asynchronous task result. More... | |
Public Member Functions | |
UserLockServer (string serverName) | |
Create an instance of UserLockServer by providing the address of the UserLock server. | |
UserLockServer () | |
Create an instance of UserLockServer connected to the local UserLock service. | |
string | GetConnectionString () |
Gets the connection string to the database used by the UserLock server. | |
int | TestUserLockSession (string userName, string computerName, string clientName, string clientIps, SessionType sessionType, DateTime dateTime, out bool isAllowed, out string ulSrvAnswer) |
Tests if a new UserLock session would be allowed or denied. | |
string | TestUserLockSession (string userName) |
Tests if a new UserLock session would be allowed or denied. | |
bool | CheckAdminCredentials (string account, string domain, string password) |
Check if the credentials for an admin account are valid. | |
void | Refresh () |
Refresh specific UserLock data. | |
void | Refresh (ServerDataElement elements) |
Refresh all UserLock data. | |
void | Reconnect () |
Reconnect to the UserLock server. | |
string | GetEnforceSync () |
Enforce synchronization with the primary server. This command can only be sent to a backup server. | |
string | GetEnforceSessionSync () |
Enforce session synchronization with the primary server. This command can only be sent to a backup server. | |
List< ReportedUser > | GetOrphanedUsers () |
Get all orphaned users. | |
bool | ResetMFAKey (string UserName) |
Resets the MFA key for the provided user account name. | |
void | DisableMFA (string accountName, DateTime startDate, DateTime endDate) |
Disable MFA for the provided account name. | |
void | DisableMFAAndResetMFAHelpMeStatus (string accountName, DateTime startDate, DateTime endDate) |
Disable MFA and reset the MFA help me status for the provided account name. | |
TaskAsync | RestartServiceAsync (string serviceName, string computerName=".") |
Restart service on computer. | |
bool | CanTestMfaUrl () |
Checks if the MFA IIS URL is relative or not. | |
bool | TestMfaUrl (out string errorMessage, string publicUrl="", string privateUrl="") |
Tests the MFA URL. | |
IList< EnabledPolicies > | GetEnabledPolicies () |
Retrive a list of all enabled policies on the server. | |
Static Public Member Functions | |
static void | UrlDecode (ref String sToDecode) |
URL decode the parameter string according to the HTML URL Encoding Reference (https://www.w3schools.com/TAGS/ref_urlencode.asp). | |
static void | UrlEncode (ref String s, bool bEncodeSlash=true, bool bEncodeComma=false, bool bEncodePr100=true, bool bEncodeColon=true, bool bEncodeBackS=true, bool bEncodeAster=true, bool bEncodeSemiC=true, bool bEncodeParLe=true, bool bEncodeParRi=true, bool bEncodeNewLi=true) |
URL encode the parameter string according to the HTML URL Encoding Reference (https://www.w3schools.com/TAGS/ref_urlencode.asp). | |
static string | CombineUrl (string baseUrl, string pathToAdd) |
Properties | |
ClientServerCompatibility | ServerCompatibility [get] |
Compatibility between the client and the server. | |
Version | ClientCommandSetVersion [get] |
The version of the command set of the client. | |
Version | ServerCommandSetVersion [get] |
The version of the command set of the server. | |
string | UserName [get, set] |
The username. | |
string | DomainName [get, set] |
The domain name. | |
string | Password [get, set] |
The password. | |
Exception | ConnectionException [get] |
Get the last exception generated by the client/server communication. See the example in the constructor of the class UserLockServer. | |
string | ConnectionStringWithoutPassword [get] |
Get the connection string to the database used by the UserLock server for the logon history. | |
ServerProperties | Properties [get] |
Get the server properties. See the ServerProperties class for more information. | |
MinMaxSessionCounts | MinMaxSessionCounts [get] |
The min and max session counts. | |
LicenseStatus | LicenseStatus [get] |
Get the license status for the UserLock server. See the enum LicenseStatus for all possible values. | |
LicenseUseStatus | LicenseUseStatus [get] |
Use of the license. See the LicenseUseStatus enum for all possible values. | |
bool | IsSmtpConfigured [get] |
true if E-mail settings for notifications are configured, false otherwise. | |
bool | AdminCredentialsStatus [get] |
true if the credentials of the impersonation account are valid, false otherwise. | |
ProtectedAccounts | ProtectedAccounts [get] |
Get the list of all protected accounts configured on the UserLock server. | |
Messages | Messages [get] |
Get the list of all customizable message from the UserLock server. | |
ReportedUserSessions | UserSessions [get] |
Interactive user sessions. | |
ReportedUserSessions | AllUserSessions [get] |
All user sessions. | |
ReportedUserSessions | UserSessionsWithSessionOnly [get] |
Users with sessions. | |
ReportedUserSessions | UserSessionsActiveSessionsOnly [get] |
Active user sessions (not locked and not disconnected). | |
ReportedUserSessions | UserSessionsWithMoreOneSessionOnly [get] |
Users with more than one session. | |
ReportedUserSessions | UserSessionsComputerUnavailableOnly [get] |
Users with orphaned sessions (sessions on unreachable computers). | |
ReportedUserSessions | UserSessionsLockedSessionsOnly [get] |
Locked user sessions. | |
ReportedUserSessions | UserSessionsWorkstationSessionsOnly [get] |
workstation user sessions. | |
ReportedUserSessions | UserSessionsTerminalSessionsOnly [get] |
terminal user sessions. | |
ReportedUserSessions | UserSessionsIisSessionsOnly [get] |
iis user sessions. | |
ReportedUserSessions | UserSessionsVpnSessionsOnly [get] |
vpn user sessions. | |
ReportedUserSessions | UserSessionsWifiSessionsOnly [get] |
wifi user sessions. | |
ReportedUserSessions | UserSessionsSaasSessionsOnly [get] |
saas user sessions. | |
ReportedUserSessions | UserSessionsWithActiveUser [get] |
user sessions with active user. | |
ReportedUserSessions | UserSessionsWithProtectedUser [get] |
user sessions with protected user. | |
ReportedUserSessions | UserSessionsWithUnprotectedUser [get] |
user sessions with unprotected user. | |
ReportedUserSessions | UserSessionsWithHighRiskUser [get] |
user sessions with high risk user. | |
ReportedUserSessions | UserSessionsWithRiskUser [get] |
user sessions with risk user. | |
ReportedUserSessions | UserSessionsWithNewUser [get] |
user sessions with new user. | |
ReportedUserSessions | UserSessionsWithInactiveUser [get] |
user sessions with inactive user. | |
ReportedUserSessions | UserSessionsWithOneSessionOnly [get] |
user sessions with inactive user. | |
ReportedMachineSessions | MachineSessions [get] |
All machine sessions. | |
ReportedMachineSessions | MachineSessionsWithSessionOnly [get] |
Machines with sessions. | |
ReportedMachineSessions | MachineSessionsActiveSessionsOnly [get] |
Active machine sessions (not locked and not disconnected). | |
ReportedMachineSessions | MachineSessionsComputerUnavailableOnly [get] |
Machines with orphaned sessions (sessions on unreachable computers). | |
ReportedMachineSessions | MachineSessionsWithMoreOneSessionOnly [get] |
Machines with more than one session. | |
ReportedMachineSessions | MachineSessionsWithOneSessionOnly [get] |
Machines with only one session. | |
ReportedRasSessions | RasUserSessions [get] |
Wi-Fi / VPN (RAS) user sessions. | |
List< ReportedMachine > | ReportedMachinesSimpleEx [get] |
List of workstations with the number of sessions on each workstation, and optionally the username. User and session information is optionally provided. This is a public command. Anyone can get this information. | |
MachineStates | AgentDistributionDCOnly [get] |
Agent status for all domain controllers in the protected network zone. | |
MachineStates | AgentDistributionMacOnly [get] |
Agent status for all macOS computers in the protected network zone. | |
int | TotalSessionCount [get] |
The total number of sessions. | |
int | TotalUserCount [get] |
The total number of users. | |
int | CurrentNumberLicencesConsumed [get] |
The current number of licenses consumed. | |
int | NumberLicencesConsumedOneYearMax [get] |
The probable number of licenses that could be consumed after one year of use of the software if you only protect Interactive sessions (twice the number of Desktop UserLock agents installed). This number is not realistic if you are protecting IIS, Wi-Fi, or VPN sessions. | |
int | NumberLicencesConsumedOneYearProbablyInteractive [get] |
The probable number of licenses that could be consumed after one year of use of the software if you only protect Interactive sessions (twice the number of Desktop UserLock agents installed). This number is not realistic if you are protecting IIS, Wi-Fi, or VPN sessions. | |
int | MaxSessionCount [get] |
This property is obsolete. Use MaxNumberConsumableLicences instead. | |
int | MaxNumberConsumableLicences [get] |
The maximum number of consumable licenses. | |
bool | IsSubscription [get] |
The licensing mode, true if subscriptive. | |
bool | IsByUser [get] |
The licensing mode, true if by users. | |
bool | Connected [get] |
True if the instance of UserLockServer is connected to a UserLock server. False otherwise. | |
Asynchronous task management | |
enum | OperationType |
Operation types for ExecuteOperation method. | |
List< TaskAsyncResult > | QueryStateAsyncTask (ref TaskAsync taskAsync) |
Queries the state asynchronous task. | |
bool | UnsubcribeQueryAsyncTask (TaskAsync taskAsync) |
Unsubcribes the query asynchronous task. After this method, it is not possible to query any more the task state, but the asynchronous task is working on. | |
bool | CancelAsyncTask (TaskAsync taskAsync) |
Cancels the asynchronous task. | |
bool | ExecuteOperation (OperationType operationType, string[] itemKeys, IOperationParams operationParams, IOperationNotify callBackInstance) |
Executes one operation. | |
General properties | |
string | ServerName [get, set] |
Get or set the address of the UserLock server. Specify a dot (.) for a local server. | |
string | ServerAddress [get] |
Get the address of the UserLock server. A null value is returned for a local server. | |
static string | LocalMachineName [get] |
Get the name of the local machine the UserLock API is running on. | |
string | DisplayName [get] |
Get the display name (NetBIOS name) of the UserLock server. | |
string | ServiceVersion [get] |
Get the version of the UserLock service. | |
string | UserLockServerDomainName [get] |
Get the domain name (NetBIOS name) of the UserLock server. | |
System.Collections.Specialized.StringDictionary | IllegitimateServerNames [get] |
The illegitimate server names. | |
ServerMode | ServerType [get] |
Get the server type. See the enum ServerMode for more information. | |
string | BackupServer [get] |
The name of the backup server, if any. | |
Session properties and functions | |
List< ReportedUser > | ReportedUsers [get] |
List of users with the list of interactive sessions for each. See the class ReportedUser. | |
List< ReportedUser > | AllReportedUsers [get] |
List of users with the list of all kind of sessions for each. See the class ReportedUser. | |
List< ReportedUser > | ReportedUsersWithMoreThanOneSession [get] |
List of users with more than one session. | |
List< ReportedUser > | ActiveReportedUsers [get] |
List of users with an active status (protected + unprotected). See the enum UserStatus. | |
List< ReportedUser > | ProtectedReportedUsers [get] |
List of users with an protected status. See the enum UserStatus. | |
List< ReportedUser > | UnprotectedReportedUsers [get] |
List of users with an unprotected status. See the enum UserStatus. | |
List< ReportedUser > | HighRiskReportedUsers [get] |
List of users with an high risk status. See the enum UserStatus. | |
List< ReportedUser > | RiskReportedUsers [get] |
List of users with a risk status. See the enum UserStatus. | |
List< ReportedUser > | NewReportedUsers [get] |
List of users with a new status. See the enum UserStatus. | |
List< ReportedUser > | InactiveReportedUsers [get] |
List of users with an inactive status. See the enum UserStatus. | |
List< ReportedUser > | ReportedUsersWithOneSessionOnly [get] |
List of users with only one session. | |
List< Session > | AllSessions [get] |
Get all sessions from any kind. | |
List< InteractiveSession > | InteractiveSessions [get] |
Get all interactive sessions. | |
List< RasSession > | RasSessions [get] |
Get the list of Wi-Fi / VPN sessions. See the class RasSession. | |
List< IisSession > | IisSessions [get] |
Get the list of IIS sessions. See the class IisSession. | |
List< ReportedMachine > | ReportedMachines [get] |
Get the list of computers with the list of interactive sessions on each computer. See the class ReportedMachine. | |
List< ReportedMachine > | ReportedMachinesSimple [get] |
List of workstations with only the number of sessions on each workstation. User and session information is not provided. This is a public command. Anyone can get this information. | |
ReportedUser | GetReportedUser (string userName) |
Get interactive sessions for a specific user. See the class ReportedUser. | |
ReportedMachine | GetReportedMachine (string machineName) |
Get interactive sessions on a specific computer. See the class ReportedMachine. | |
Agent distribution | |
Machines | MachineDistribution [get] |
Get the all machines with all agent inside of the protected network zone. | |
Machines | MachineDistributionAll [get] |
Get all machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionDCOnly [get] |
Get Domain Controller machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionRRASOnly [get] |
Get RRAS machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionNPSOnly [get] |
Get NPS machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionIISOnly [get] |
Get IIS machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionUnavailable [get] |
Get Unavailable machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionWithoutAgent [get] |
Get machines without agent inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionMACOnly [get] |
Get Mac machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionWithAgent [get] |
Get machines with agent inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionWorkstation [get] |
Get Workstation machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionServer [get] |
Get Server machines inside of the protected network zone. See the class Machines. | |
Machines | MachineDistributionDesktop [get] |
Get machines, inside of the protected network zone, where agent desktop can be installed. See the class Machines. | |
MachineStates | AgentDistribution [get] |
Get the agent status for all machines of the protected network zone. | |
MachineStates | AgentDistributionWithoutAgent [get] |
Get the agent status for all machines of the protected network zone without the agent installed. | |
MachineStates | AgentDistributionUnavailable [get] |
Get the agent status for all unavailable machines of the protected network zone. | |
AgentDistributionProperties | AgentDistributionProperties [get] |
Get the agent distribution properties of the UserLock server. See the class AgentDistributionProperties for more information. | |
Statistics | |
SessionStatisticMode | SessionStatisticMode [get, set] |
Get set the session statistic mode. See the enum SessionStatisticMode. | |
Statistic[] | SessionStatistics [get] |
Get session statistics (Session break down Orphaned/Locked Interactive/Active Interactive/RAS/IIS). See also the class Statistic. | |
Statistic[] | UserStatistics [get] |
Get user statistics (0 session/1 session/More than 1 session). See also the class Statistic. | |
Statistic[] | UserStatusStatistics [get] |
Get user status statistics (high risk/risk/new/inactive/protected/unprotected). See also the class Statistic. | |
Statistic[] | MachineStatistics [get] |
Get machine statistics (0 session/1 session/> 1 session). See also the class Statistic. | |
Statistic[] | AgentDistributionStatistics [get] |
Get agent statistic (Not Installed/Installed/Unknown/Installing/Uninstalling/Upgrading). See also the class Statistic. | |
Statistic[] | AgentTypeStatistics [get] |
Agent type statistics (Desktop, DC, NPS, IIS, RRAS (deprecated)). See also the Statistic class. | |
Statistic[] | MachineStateStatistics [get] |
Get ServerLevel statistic (DC/IAS/IIS/RRAS(deprecated)....). See also the class Statistic. | |
Statistic[] | ProtectedAccountStatistics [get] |
Get Protected account statistic (OU / Groups / Users). See also the class Statistic. | |
HashSet< String > | MfaNeedHelpUserList [get] |
Get the list of users needing help for mfa. | |
Statistic[] | MachineEnvironmentStatistics [get] |
Get Machine Environment statistics. See also the class Statistic. | |
Statistic[] | UserEnvironmentStatistics [get] |
Get User Environment statistics. See also the class Statistic. | |
Statistic[] | MonitoringSessionsStatistics [get] |
Get monitoring sessions statistics. See also the class Statistic. | |
Statistic[] | MonitoringUserSessionsStatistics [get] |
Get monitoring user sessions statistics. See also the class Statistic. | |
Statistic[] | MonitoringMachineSessionsStatistics [get] |
Get monitoring machine sessions statistics. See also the class Statistic. | |
Quota management functions | |
TimeQuotaStatus | GetUserQuotaStatus (string userAccount) |
Get the quota status for a user. See the documentation of the class TimeQuotaStatus. | |
void | DecreaseConsumedTime (string userAccount, SessionType sessionType, TimeQuota.Period period, int minutes) |
Decrease the time consumed by a user for a specific type of session and quota period. | |
void | DecreaseConsumedTime (string userAccount, SessionType sessionType, TimeQuota.Period period, TimeSpan timeToDecrease) |
Decrease the time consumed by a user for a specific type of session and quota period. | |
void | ResetConsumedTime (string userAccount) |
Reset the time consumed by a user to 0 for all types of session and all quota periods. | |
void | ResetConsumedTime (string userAccount, SessionType sessionType, TimeQuota.Period period) |
Reset the time consumed by a user to 0 for a specific type of session and quota period. | |
Protected account management functions | |
ProtectedAccount | GetProtectedAccount (string identifier) |
Get a temporary protected account by its identifier. | |
ProtectedAccount | GetProtectedAccount (string identifier, ProtectedAccountBase.AccountPropertyList propertyList) |
Get a protected account. | |
ProtectedAccount | GetTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate) |
Gets the temporary protected account from the account name and start and end dates. | |
ProtectedAccountEffective | GetProtectedAccountEffective (string accountName, ProtectedAccountBase.AccountPropertyList propertyList, ProtectedAccount.ComplexEffRestsPropertyList cersPropertyList) |
Get effective restrictions of a user (depending on the policy). | |
bool | DoesProtectedAccountExist (string accountName) |
Check if a protected account exists. | |
bool | AddProtectedGroup (string groupName, out ProtectedAccount paRet) |
Add a new protected group and return it if succeeded. | |
bool | AddProtectedGroup (string groupName) |
Add a new protected group. | |
bool | AddProtectedUser (string userName, out ProtectedAccount paRet) |
Add a new protected user and return it if succeeded. | |
bool | AddProtectedUser (string userName) |
Add a new protected user. | |
bool | AddProtectedOu (string ouDistinguishedName, out ProtectedAccount paRet) |
Add a new protected organizational unit and return it if succeeded. | |
bool | AddProtectedOu (string ouDistinguishedName) |
Add a new protected organizational unit. | |
bool | AddProtectedAccount (string accountName, ProtectedAccountType pat) |
Add a protected account by its name and its type. | |
bool | AddProtectedAccount (string accountName, ProtectedAccountType pat, string idPaToCopyCfgFrom) |
Add a protected account by its name, its type and another protected account to copy all configuration from. | |
bool | AddTemporaryProtectedUser (string accountName, DateTime startDate, DateTime endDate) |
Add a user temporary protected account by its name. | |
bool | AddTemporaryProtectedGroup (string accountName, DateTime startDate, DateTime endDate) |
Add a group temporary protected account by its name. | |
bool | AddTemporaryProtectedOu (string accountName, DateTime startDate, DateTime endDate) |
Add a OU temporary protected account by its name. | |
bool | AddTemporaryProtectedUser (string accountName, DateTime startDate, DateTime endDate, out ProtectedAccount paRet) |
Add a user temporary protected account by its name and return it if succeeded. | |
bool | AddTemporaryProtectedGroup (string accountName, DateTime startDate, DateTime endDate, out ProtectedAccount paRet) |
Add a group temporary protected account by its name and return it if succeeded. | |
bool | AddTemporaryProtectedOu (string accountName, DateTime startDate, DateTime endDate, out ProtectedAccount paRet) |
Add a OU temporary protected account by its name and return it if succeeded. | |
bool | AddTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate, ProtectedAccountType pat, out ProtectedAccount paRet) |
Add a temporary protected account by its name, its start and end dates and its type and return it if succeeded. | |
bool | AddTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate, ProtectedAccountType pat) |
Add a temporary protected account by its name, its start and end dates and its type. | |
bool | AddTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate, ProtectedAccountType pat, bool bCopyCfgFromPrmPa) |
Add a temporary protected account by its name, its start and end dates, its type and a bool to copy the configuration of the corresponding permanent protected account if any. | |
bool | AddTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate, ProtectedAccountType pat, string idPaToCopyCfgFrom) |
Add a temporary protected account by its name, its start and end dates, its type and another protected account to copy all configuration from. | |
bool | AddProtectedAccount (string accountName, ProtectedAccountType pat, string idPaToCopyCfgFrom, out ProtectedAccount paRet) |
Adds a permanent protected account with its name, the type of account, the ID of another protected account from which the entire configuration is copied, returns if it was successful, and if so returns created object. | |
bool | AddTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate, ProtectedAccountType pat, string idPaToCopyCfgFrom, out ProtectedAccount paRet) |
Adds a temporary protected account with its name, the start and end dates, the type of account, the ID of another protected account from which the entire configuration is copied, returns if it was successful, and if so returns created object. | |
bool | DeleteProtectedAccount (ProtectedAccount protectedAccount) |
Delete a protected account. | |
bool | DeleteProtectedAccount (string accountName) |
Delete a protected account by name. | |
bool | DeleteTemporaryProtectedAccount (string accountName, DateTime startDate, DateTime endDate) |
Delete a temporary protected account by its name and start and end dates. | |
Session management | |
bool | Logoff (string session) |
Logoff an interactive session. | |
TaskAsync | LogoffAsync (string[] sessions) |
Logoffs interactive and IIS sessions in asynchronous way. | |
bool | Logoff (Session session) |
Logoff an interactive session. | |
TaskAsync | LogoffAsync (List< Session > sessions) |
Logoffs interactive and IIS sessions in asynchronous way. | |
bool | LogoffIis (string session) |
Logoff a IIS session. | |
bool | LogoffIis (IisSession session) |
Logoff a IIS session. | |
bool | Lock (string session) |
Lock an interactive session by specifying the session name. | |
TaskAsync | LockAsync (string[] sessions) |
Locks interactive sessions in asynchronous way. | |
bool | Lock (Session session) |
Lock an interactive session. | |
TaskAsync | LockAsync (List< Session > sessions) |
Locks interactive sessions in asynchronous way. | |
bool | Reset (string session) |
Reset an interactive session. | |
bool | ResetRas (string session) |
Reset a RAS session. | |
bool | ResetIis (string session) |
Reset a IIS session. | |
bool | Reset (Session session) |
Reset a session with a Session instance retrieved from the server. | |
TaskAsync | ResetAsync (List< Session > sessions) |
Reset sessions with several Session instances retrieved from the server, in asynchronous way. | |
bool | SendPopup (string session, string message) |
Overloaded function to send a popup to an interactive session. See the full version SendPopup(string, string, string) method. | |
TaskAsync | SendPopupAsync (string[] sessions, string message) |
Overloaded function to send a popup to several interactive sessions in asynchronous way. See the full version SendPopupAsync(string[], string, string) method. | |
bool | SendPopup (string session, string message, string title) |
Send a popup to an interactive session. | |
TaskAsync | SendPopupAsync (string[] sessions, string message, string title) |
Sends a popup to several interactive sessions in asynchronous way. | |
bool | SendPopup (Session session, string message) |
Overloaded function to shutdown a computer by specifying a Session instance retrieved from the UserLock server. See the full version SendPopup(Session, string, string) method. | |
TaskAsync | SendPopupAsync (List< Session > sessions, string message) |
Overloaded function to send a popup to several interactive sessions retrieved from the UserLock server, in asynchronous way. See the full version SendPopupAsync(List<Session>, string, string) method. | |
bool | SendPopup (Session session, string message, string title) |
Send a popup to an interactive session with a Session instance retrieved from the server. | |
TaskAsync | SendPopupAsync (List< Session > sessions, string message, string title) |
Sends a popup to several interactive sessions in asynchronous way. | |
void | SendPopupToUser (string userName, string message) |
Overloaded function to send a popup in all sessions of a specific user. See the full version SendPopupToUser(string, string, string) method. | |
TaskAsync | SendPopupAsyncToUsers (string[] userNames, string message) |
Overloaded function to send a popup in all sessions of several specific users in asynchronous way. See the full version SendPopupAsyncToUsers(string[], string, string) method. | |
void | SendPopupToUser (string userName, string message, string title) |
Send a popup in all sessions of a specific user. | |
TaskAsync | SendPopupAsyncToUsers (string[] userNames, string message, string title) |
Send a popup in all sessions of several specific users in asynchronous way. | |
void | SendPopupToMachine (string machineName, string message) |
Overloaded function to send a popup to all sessions on a specific machine. See the full version SendPopupToMachine(string, string, string) method. | |
TaskAsync | SendPopupAsyncToMachines (string[] machineNames, string message) |
Overloaded function to send a popup to all sessions on several specific machines in asynchronous way. See the full version SendPopupAsyncToMachines(string[], string, string) method. | |
void | SendPopupToMachine (string machineName, string message, string title) |
Send a popup to all sessions on a specific machine. | |
TaskAsync | SendPopupAsyncToMachines (string[] machineNames, string message, string title) |
Send a popup to all sessions on several specific machines in asynchronous way. | |
void | SendPopupToGroup (string protectedGroupName, string message) |
Overloaded function to send a popup to all members of a protected group or OU. See the full version SendPopupToGroup(string, string, string) method. | |
TaskAsync | SendPopupAsyncToGroups (string[] protectedGroupNames, string message) |
Overloaded function to send a popup to all members of several protected groups or OUs in asynchronous way. See the full version SendPopupAsyncToGroups(string[], string, string) method. | |
void | SendPopupToGroup (string protectedGroupName, string message, string title) |
Send a popup to all members of a protected group or OU. | |
TaskAsync | SendPopupAsyncToGroups (string[] protectedGroupNames, string message, string title) |
Send a popup to all members of several protected groups or OUs in asynchronous way. | |
Agent management | |
bool | InstallAgent (string computer) |
Install the agent for interactive sessions on a workstation or a terminal server. | |
bool | InstallRrasAgent (string computer) |
Install the agent for RRAS sessions on a Microsoft RRAS server (deprecated). | |
bool | InstallIasAgent (string computer) |
Install the agent for RADIUS sessions on a Microsoft NPS (IAS) server. | |
bool | InstallIisAgent (string computer) |
Install the agent for IIS sessions on a Microsoft IIS server. | |
bool | InstallAgent (MachineState machineState) |
Install an agent with a MachineState instance retrieved from the server. | |
TaskAsync | InstallAgentAsync (List< MachineState > machineStates) |
Install multiple agents asynchronously, specifying MachineState instances retrieved from the UserLock server. | |
bool | UninstallAgent (string computer) |
Uninstall the agent for interactive sessions from a workstation or a terminal server. | |
bool | UninstallRrasAgent (string computer) |
Uninstall the agent for RRAS sessions from a Microsoft RRAS server (deprecated). | |
bool | UninstallIasAgent (string computer) |
Uninstall the agent for RADIUS sessions from a Microsoft IAS/NPS server. | |
bool | UninstallIisAgent (string computer) |
Uninstall the agent for IIS sessions from a Microsoft IIS server. | |
bool | UninstallAgent (MachineState machineState) |
Uninstall the agent by using a MachineState instance retrieved from the server. | |
TaskAsync | UninstallAgentAsync (List< MachineState > machineStates) |
Uninstall agents with several MachineState instances retrieved from the server, in asynchronous way. | |
Computer management | |
bool | Reboot (string computer) |
Reboot a computer. | |
TaskAsync | RebootAsync (string[] computers) |
Reboots several computers in asynchronous way. | |
bool | Reboot (MachineState machineState) |
Reboot a computer by specifying a MachineState instance retrieved from the UserLock server. | |
TaskAsync | RebootAsync (List< MachineState > machineStates) |
Reboot multiple computers asynchronously, specifying MachineState instances retrieved from the UserLock server. | |
bool | WakeUp (string computer) |
Wakes up a computer. | |
TaskAsync | WakeUpAsync (string[] computers) |
Wakes up several computers in asynchronous way. | |
bool | WakeUp (MachineState machineState) |
Wakes up a computer by specifying a MachineState instance retrieved from the UserLock server. | |
TaskAsync | WakeUpAsync (List< MachineState > machineStates) |
Wake up multiple computers asynchronously, specifying MachineState instances retrieved from the UserLock server. | |
bool | Shutdown (string computer) |
Overloaded function to shutdown a computer. See the full version Shutdown(string, ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
TaskAsync | ShutdownAsync (string[] computers) |
Overloaded function to shutdown several computers in asynchronous way. See the full version ShutdownAsync(string[], ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
bool | Shutdown (string computer, ExecutionMode executionMode, ForceMode forceMode, string message) |
Overloaded function to shutdown a computer. See the full version Shutdown(string, ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
TaskAsync | ShutdownAsync (string[] computers, ExecutionMode executionMode, ForceMode forceMode, string message) |
Overloaded function to shutdown several computers in asynchronous way. See the full version ShutdownAsync(string[], ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
bool | Shutdown (string computer, double timeOut, string message) |
Overloaded function to shutdown a computer. See the full version Shutdown(string, ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
TaskAsync | ShutdownAsync (string[] computers, double timeOut, string message) |
Overloaded function to shutdown several computers in asynchronous way. See the full version ShutdownAsync(string[], ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
bool | Shutdown (string computer, ExecutionMode executionMode, NotifyMode notifyMode, double timeOut, ForceMode forceMode, string message) |
Shutdown a computer. | |
TaskAsync | ShutdownAsync (string[] computers, ExecutionMode executionMode, NotifyMode notifyMode, double timeOut, ForceMode forceMode, string message) |
Shutdowns several computers in asynchronous way. | |
bool | Shutdown (MachineState machineState) |
Shutdown a computer by specifying a MachineState instance retrieved from the UserLock server. | |
TaskAsync | ShutdownAsync (List< MachineState > machineStates) |
Overloaded function to shutdown several computers in asynchronous way, by specifying MachineState instances retrieved from the UserLock server. See the full version ShutdownAsync(List<MachineState>, ExecutionMode, NotifyMode, double, ForceMode, string) method. | |
TaskAsync | ShutdownAsync (List< MachineState > machineStates, ExecutionMode executionMode, NotifyMode notifyMode, double timeOut, ForceMode forceMode, string message) |
Shut down multiple computers asynchronously, specifying MachineState instances retrieved from the UserLock server. | |
Database management | |
bool | CreateTable () |
Create or recreate the UserLogonEvents table where is stored the logon history in the UserLock database. | |
bool | CreateTimeIndex () |
Creates an index on the EventTime field of the UserLogonEvents table to speed up queries on time frames. | |
bool | DeleteTimeIndex () |
Deletes the index on the EventTime field of the UserLogonEvents table. | |
bool | ExecuteSqlCommand (string command) |
Executes an SQL command on the UserLock database. | |
bool | CompactDatabase () |
Compacts the default UserLock database. | |
bool | CleanOldLogons (int days) |
Removes logon events older than a specific number of days from the logon history database. | |
bool | CleanOldLogons (DateTime limitDate) |
Removes logon events older than a specific date from the logon history database. | |
bool | CleanAllLogons () |
Clear all logon events the logon history database. | |
void | UnblockAUser (string accountName) |
Unblock a specific account with the provided user name. | |
void | BlockAUser (string accountName, bool createPermanentPA, string message, bool closeAllSessions) |
Blocks a specific account with the provided user name (create the related protected account if it doesn't exist). | |
bool | ExistingActiveTemporaryProtectedAccount (string protectedAccountName) |
Return True if the provided account name has already an active temporary protected account. | |
void | CloseAllSessionAfterBlocking (string protectedAccountName) |
Close all the opened sessions of a protected account after this user has been blocked. | |
Initial Access Point Policy | |
InitialAccessPointPolicy | GetInitialAccessPointPolicy (string paIdentifier) |
Get the InitialAccessPointPolicy for paIdentifier | |
InitialAccessPointPolicy | GetTemporaryInitialAccessPointPolicy (string accountName, DateTime startDate, DateTime endDate) |
Get a temporary InitialAccessPointPolicy for accountName . | |
bool | AddInitialAccessPointPolicyToGroup (string groupName, out InitialAccessPointPolicy policyRet) |
Add a initial access point policy to a group. | |
bool | AddInitialAccessPointPolicyToGroup (string groupName) |
Add a initial access point policy to a group. | |
bool | AddInitialAccessPointPolicyToUser (string userName, out InitialAccessPointPolicy policyRet) |
Add a initial access point policy to a User. | |
bool | AddInitialAccessPointPolicyToUser (string userName) |
Add a initial access point policy to a User. | |
bool | AddInitialAccessPointPolicyToOu (string ouName, out InitialAccessPointPolicy policyRet) |
Add a initial access point policy to a OU. | |
bool | AddInitialAccessPointPolicyToOu (string ouName) |
Add a initial access point policy to a OU. | |
bool | AddTemporaryInitialAccessPointPolicyToOu (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary initial access point policy to a OU. | |
bool | AddTemporaryInitialAccessPointPolicyToOu (string accountName, DateTime startDate, DateTime endDate, out InitialAccessPointPolicy policyRet) |
Add a temporary initial access point policy to a OU. | |
bool | AddTemporaryInitialAccessPointPolicyToGroup (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary initial access point policy to a Group. | |
bool | AddTemporaryInitialAccessPointPolicyToGroup (string accountName, DateTime startDate, DateTime endDate, out InitialAccessPointPolicy policyRet) |
Add a temporary initial access point policy to a Group. | |
bool | AddTemporaryInitialAccessPointPolicyToUser (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary initial access point policy to a User. | |
bool | AddTemporaryInitialAccessPointPolicyToUser (string accountName, DateTime startDate, DateTime endDate, out InitialAccessPointPolicy policyRet) |
Add a temporary initial access point policy to a User. | |
Session Limit Policy | |
SessionLimitPolicy | GetSessionLimitPolicy (string paIdentifier) |
Get the SessionLimitPolicy for paIdentifier | |
SessionLimitPolicy | GetTemporarySessionLimitPolicy (string accountName, DateTime startDate, DateTime endDate) |
Get a temporary SessionLimitPolicy for accountName . | |
bool | AddSessionLimitPolicyToGroup (string groupName, out SessionLimitPolicy policyRet) |
Add a Session Limit policy to a group. | |
bool | AddSessionLimitPolicyToGroup (string groupName) |
Add a Session Limit policy to a group. | |
bool | AddSessionLimitPolicyToUser (string userName, out SessionLimitPolicy policyRet) |
Add a Session Limit policy to a User. | |
bool | AddSessionLimitPolicyToUser (string userName) |
Add a Session Limit policy to a User. | |
bool | AddSessionLimitPolicyToOu (string ouName, out SessionLimitPolicy policyRet) |
Add a Session Limit policy to a OU. | |
bool | AddSessionLimitPolicyToOu (string ouName) |
Add a Session Limit policy to a OU. | |
bool | AddTemporarySessionLimitPolicyToOu (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary Session Limit policy to a OU. | |
bool | AddTemporarySessionLimitPolicyToOu (string accountName, DateTime startDate, DateTime endDate, out SessionLimitPolicy policyRet) |
Add a temporary Session Limit policy to a OU. | |
bool | AddTemporarySessionLimitPolicyToGroup (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary Session Limit policy to a Group. | |
bool | AddTemporarySessionLimitPolicyToGroup (string accountName, DateTime startDate, DateTime endDate, out SessionLimitPolicy policyRet) |
Add a temporary Session Limit policy to a Group. | |
bool | AddTemporarySessionLimitPolicyToUser (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary Session Limit policy to a User. | |
bool | AddTemporarySessionLimitPolicyToUser (string accountName, DateTime startDate, DateTime endDate, out SessionLimitPolicy policyRet) |
Add a temporary Session Limit policy to a User. | |
Workstation restrictions Policy | |
WorkstationPolicy | GetWorkstationPolicy (string paIdentifier) |
Get the WorkstationPolicy for paIdentifier | |
WorkstationPolicy | GetTemporaryWorkstationPolicy (string accountName, DateTime startDate, DateTime endDate) |
Get a temporary WorkstationPolicy for accountName . | |
bool | AddWorkstationPolicyToGroup (string groupName, out WorkstationPolicy policyRet) |
Add a Workstation restrictions policy to a group. | |
bool | AddWorkstationPolicyToGroup (string groupName) |
Add a Workstation restrictions policy to a group. | |
bool | AddWorkstationPolicyToUser (string userName, out WorkstationPolicy policyRet) |
Add a Workstation restrictions policy to a User. | |
bool | AddWorkstationPolicyToUser (string userName) |
Add a Workstation restrictions policy to a User. | |
bool | AddWorkstationPolicyToOu (string ouName, out WorkstationPolicy policyRet) |
Add a Workstation restrictions policy to a OU. | |
bool | AddWorkstationPolicyToOu (string ouName) |
Add a Workstation restrictions policy to a OU. | |
bool | AddTemporaryWorkstationPolicyToOu (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary Workstation restrictions policy to a OU. | |
bool | AddTemporaryWorkstationPolicyToOu (string accountName, DateTime startDate, DateTime endDate, out WorkstationPolicy policyRet) |
Add a temporary Workstation restrictions policy to a OU. | |
bool | AddTemporaryWorkstationPolicyToGroup (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary Workstation restrictions policy to a Group. | |
bool | AddTemporaryWorkstationPolicyToGroup (string accountName, DateTime startDate, DateTime endDate, out WorkstationPolicy policyRet) |
Add a temporary Workstation restrictions policy to a Group. | |
bool | AddTemporaryWorkstationPolicyToUser (string accountName, DateTime startDate, DateTime endDate) |
Add a temporary Workstation restrictions policy to a User. | |
bool | AddTemporaryWorkstationPolicyToUser (string accountName, DateTime startDate, DateTime endDate, out WorkstationPolicy policyRet) |
Add a temporary Workstation restrictions policy to a User. | |
Instance of a local or remote UserLock server.
UserLockServer | ( | string | serverName | ) |
Create an instance of UserLockServer by providing the address of the UserLock server.
serverName | Address of the UserLock server (name/FQDN/IP address). Specify a dot (.) if the server is local. |
Connect to a local server and check that the connection was successful
Connect to a remote server and check that the connection was successful
Optimized server disconnection with the using statement. At the end of the scope the API is automatically disconnected from the UserLock server. Do so if you create many instances of the UserLockServer class for short periods.
int TestUserLockSession | ( | string | userName, |
string | computerName, | ||
string | clientName, | ||
string | clientIps, | ||
SessionType | sessionType, | ||
DateTime | dateTime, | ||
out bool | isAllowed, | ||
out string | ulSrvAnswer ) |
Tests if a new UserLock session would be allowed or denied.
userName | The user name. |
computerName | The computer name. |
clientName | The client name. |
clientIps | The client IP(s). |
sessionType | The session type. |
dateTime | The date time at which to test the logon. |
isAllowed | If set to true , a new UserLock session would be allowed. |
ulSrvAnswer | The answer of the UserLock server. |
UserException | This method is not supported in UserLock services older than 9 version. |
string TestUserLockSession | ( | string | userName | ) |
Tests if a new UserLock session would be allowed or denied.
userName | The user name. |
UserException | This method is not supported in UserLock services older than 9 version. |
bool CheckAdminCredentials | ( | string | account, |
string | domain, | ||
string | password ) |
Check if the credentials for an admin account are valid.
account | Account name |
domain | Domain of the account |
password | Password for this account |
ReportedUser GetReportedUser | ( | string | userName | ) |
Get interactive sessions for a specific user. See the class ReportedUser.
userName | User account name |
Example: Logoff all sessions of the user myuser
ReportedMachine GetReportedMachine | ( | string | machineName | ) |
Get interactive sessions on a specific computer. See the class ReportedMachine.
machineName | Name of the computer |
Example: Logoff all sessions on the computer MYCOMPUTER.
TimeQuotaStatus GetUserQuotaStatus | ( | string | userAccount | ) |
Get the quota status for a user. See the documentation of the class TimeQuotaStatus.
userAccount | User account name. The domain is needed if the account is from another domain (DOMAIN\account). |
Example: Get the quota status for a specific user.
void DecreaseConsumedTime | ( | string | userAccount, |
SessionType | sessionType, | ||
TimeQuota::Period | period, | ||
int | minutes ) |
Decrease the time consumed by a user for a specific type of session and quota period.
userAccount | User account name. The domain is needed if the account is from another domain (DOMAIN\account). |
sessionType | Type of the session. See SessionType enum. |
period | Time quota period. See the enum TimeQuota.Period. |
minutes | Time length to decrease in minutes. |
Example: Decrease the daily consumed time on workstations for a specific user by 1 hour.
void DecreaseConsumedTime | ( | string | userAccount, |
SessionType | sessionType, | ||
TimeQuota::Period | period, | ||
TimeSpan | timeToDecrease ) |
Decrease the time consumed by a user for a specific type of session and quota period.
userAccount | User account name. The domain is needed if the account is from another domain (DOMAIN\account). |
sessionType | Type of the session. See SessionType enum. |
period | Time quota period. See the enum TimeQuota.Period. |
timeToDecrease | Time length to decrease. |
Example: Decrease the daily consumed time on workstations for a specific user by 1 hour.
void ResetConsumedTime | ( | string | userAccount | ) |
Reset the time consumed by a user to 0 for all types of session and all quota periods.
userAccount | User account name. The domain is needed if the account is from another domain (DOMAIN\account). |
Example: Reset the consumed time for a specific user.
void ResetConsumedTime | ( | string | userAccount, |
SessionType | sessionType, | ||
TimeQuota::Period | period ) |
Reset the time consumed by a user to 0 for a specific type of session and quota period.
userAccount | User account name. The domain is needed if the account is from another domain (DOMAIN\account). |
sessionType | Type of the session. See SessionType enum. |
period | Time quota period. See the enum TimeQuota.Period. |
Example: Reset the daily consumed time on workstations for a specific user.
void Refresh | ( | ) |
Refresh specific UserLock data.
Example: Refresh user sessions after reseting a session. The new list of interactive sessions should reflect that the reseted session no longer exists.
ProtectedAccount GetProtectedAccount | ( | string | identifier | ) |
Get a temporary protected account by its identifier.
OUT: The concerned protected account object, null if no such protected account.
identifier | IN : The identifier of the protected account. |
ProtectedAccount GetProtectedAccount | ( | string | identifier, |
ProtectedAccountBase::AccountPropertyList | propertyList ) |
Get a protected account.
identifier | The identifier of the protected account. |
propertyList | Properties to load from the server. See the enum AccountPropertyList. Optional parameter. By default all properties are loaded. |
Example: Get a protected account and display the maximum number of allowed concurrent interactive sessions.
ProtectedAccount GetTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Gets the temporary protected account from the account name and start and end dates.
accountName | Name of the account. |
startDate | The start date. |
endDate | The end date. |
UserException | This method is not supported in UserLock services older than 8 version. |
ProtectedAccountEffective GetProtectedAccountEffective | ( | string | accountName, |
ProtectedAccountBase::AccountPropertyList | propertyList, | ||
ProtectedAccount::ComplexEffRestsPropertyList | cersPropertyList ) |
Get effective restrictions of a user (depending on the policy).
accountName | Name of the user account. |
propertyList | List of properties to calculate. See the enum AccountPropertyList. Optional parameter. By default all properties are loaded. |
cersPropertyList | List of complex properties to calculate. See the enum ComplexEffRestsPropertyList. Optional parameter. By default all complex properties are loaded. |
Example: Get effective restrictions of a user and display the maximum number of allowed concurrent interactive sessions.
bool DoesProtectedAccountExist | ( | string | accountName | ) |
Check if a protected account exists.
accountName | Name of the protected account. |
bool AddProtectedGroup | ( | string | groupName, |
out ProtectedAccount | paRet ) |
Add a new protected group and return it if succeeded.
groupName | Name of the Windows/AD group. Specify the domain name if the group is from another domain (e.g. DOMAINNAME\GroupName). |
paRet | null if failed, the created instance if succeeded. |
Example: Create a new protected group for everyone
bool AddProtectedGroup | ( | string | groupName | ) |
Add a new protected group.
groupName | Name of the Windows/AD group. Specify the domain name if the group is from another domain (e.g. DOMAINNAME\GroupName). |
Example: Create a new protected group for everyone
bool AddProtectedUser | ( | string | userName, |
out ProtectedAccount | paRet ) |
Add a new protected user and return it if succeeded.
userName | Name of the Windows/AD user account. Specify the domain name if the account is from another domain (e.g. DOMAINNAME\UserName). |
paRet | null if failed, the created instance if succeeded. |
Example: Create a new protected account for the user Bob
bool AddProtectedUser | ( | string | userName | ) |
Add a new protected user.
userName | Name of the Windows/AD user account. Specify the domain name if the account is from another domain (e.g. DOMAINNAME\UserName). |
Example: Create a new protected account for the user Bob
bool AddProtectedOu | ( | string | ouDistinguishedName, |
out ProtectedAccount | paRet ) |
Add a new protected organizational unit and return it if succeeded.
ouDistinguishedName | Distinguished name of the AD organizational unit. |
paRet | null if failed, the created instance if succeeded. |
Example: Create a new protected account for the OU "OU=MyUsers,DC=domain,DC=local"
bool AddProtectedOu | ( | string | ouDistinguishedName | ) |
Add a new protected organizational unit.
ouDistinguishedName | Distinguished name of the AD organizational unit. |
Example: Create a new protected account for the OU "OU=MyUsers,DC=domain,DC=local"
bool AddProtectedAccount | ( | string | accountName, |
ProtectedAccountType | pat ) |
Add a protected account by its name and its type.
accountName | Name of the protected account. |
pat | Type of the protected account. |
bool AddProtectedAccount | ( | string | accountName, |
ProtectedAccountType | pat, | ||
string | idPaToCopyCfgFrom ) |
Add a protected account by its name, its type and another protected account to copy all configuration from.
accountName | Name of the protected account. |
pat | Type of the protected account. |
idPaToCopyCfgFrom | Identifier of the protected account to copy all configuration from. Note that account types can be different. |
bool AddTemporaryProtectedUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a user temporary protected account by its name.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
bool AddTemporaryProtectedGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a group temporary protected account by its name.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
bool AddTemporaryProtectedOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a OU temporary protected account by its name.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
bool AddTemporaryProtectedUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out ProtectedAccount | paRet ) |
Add a user temporary protected account by its name and return it if succeeded.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
paRet | null if failed, the created instance if succeeded. |
bool AddTemporaryProtectedGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out ProtectedAccount | paRet ) |
Add a group temporary protected account by its name and return it if succeeded.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
paRet | null if failed, the created instance if succeeded. |
bool AddTemporaryProtectedOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out ProtectedAccount | paRet ) |
Add a OU temporary protected account by its name and return it if succeeded.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
paRet | null if failed, the created instance if succeeded. |
bool AddTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
ProtectedAccountType | pat, | ||
out ProtectedAccount | paRet ) |
Add a temporary protected account by its name, its start and end dates and its type and return it if succeeded.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
pat | Type of the temporary protected account. |
paRet | null if failed, the created instance if succeeded. |
Example: Add a temporary protected account for the Everyone group from 2014-05-01 00:00:00 to 2014-06-01 00:00:00.
bool AddTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
ProtectedAccountType | pat ) |
Add a temporary protected account by its name, its start and end dates and its type.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
pat | Type of the temporary protected account. |
Example: Add a temporary protected account for the Everyone group from 2014-05-01 00:00:00 to 2014-06-01 00:00:00.
bool AddTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
ProtectedAccountType | pat, | ||
bool | bCopyCfgFromPrmPa ) |
Add a temporary protected account by its name, its start and end dates, its type and a bool to copy the configuration of the corresponding permanent protected account if any.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
pat | Type of the temporary protected account. |
bCopyCfgFromPrmPa | If True, copy the configuration of the corresponding permanent protected account if any. |
bool AddTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
ProtectedAccountType | pat, | ||
string | idPaToCopyCfgFrom ) |
Add a temporary protected account by its name, its start and end dates, its type and another protected account to copy all configuration from.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
pat | Type of the temporary protected account. |
idPaToCopyCfgFrom | Identifier of the protected account to copy all configuration from. Note that account types can be different. |
bool AddProtectedAccount | ( | string | accountName, |
ProtectedAccountType | pat, | ||
string | idPaToCopyCfgFrom, | ||
out ProtectedAccount | paRet ) |
Adds a permanent protected account with its name, the type of account, the ID of another protected account from which the entire configuration is copied, returns if it was successful, and if so returns created object.
accountName | Account name. |
pat | Account type. |
idPaToCopyCfgFrom | The ID of another protected account from which the entire configuration is copied. Note that account types may be different. |
paRet | The instance created on success, null otherwise. |
bool AddTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
ProtectedAccountType | pat, | ||
string | idPaToCopyCfgFrom, | ||
out ProtectedAccount | paRet ) |
Adds a temporary protected account with its name, the start and end dates, the type of account, the ID of another protected account from which the entire configuration is copied, returns if it was successful, and if so returns created object.
accountName | Account name. |
startDate | Start date of temporary protected account. |
endDate | End date of temporary protected account. |
pat | Account type. |
idPaToCopyCfgFrom | The ID of another protected account from which the entire configuration is copied. Note that account types may be different. |
paRet | The instance created on success, null otherwise. |
bool DeleteProtectedAccount | ( | ProtectedAccount | protectedAccount | ) |
Delete a protected account.
protectedAccount | Protected account to delete (Previously retrieved from the server). |
bool DeleteProtectedAccount | ( | string | accountName | ) |
Delete a protected account by name.
accountName | Protected account to delete. |
Example: Delete the protected account for the OU "OU=MyUsers,DC=domain,DC=local"
bool DeleteTemporaryProtectedAccount | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Delete a temporary protected account by its name and start and end dates.
accountName | Name of the temporary protected account. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
Example: Delete a temporary protected account for the Everyone group from 2014-05-01 00:00:00 to 2014-06-01 00:00:00.
List< TaskAsyncResult > QueryStateAsyncTask | ( | ref TaskAsync | taskAsync | ) |
Queries the state asynchronous task.
taskAsync | The asynchronous task. |
Example: see LogoffAsync method.
bool UnsubcribeQueryAsyncTask | ( | TaskAsync | taskAsync | ) |
Unsubcribes the query asynchronous task. After this method, it is not possible to query any more the task state, but the asynchronous task is working on.
taskAsync | The asynchronous task. |
bool CancelAsyncTask | ( | TaskAsync | taskAsync | ) |
Cancels the asynchronous task.
taskAsync | The asynchronous task. |
bool ExecuteOperation | ( | OperationType | operationType, |
string[] | itemKeys, | ||
IOperationParams | operationParams, | ||
IOperationNotify | callBackInstance ) |
Executes one operation.
operationType | Type of the operation. |
itemKeys | The item keys. |
operationParams | The operation parameters if it's needed. |
callBackInstance | The call back instance if it's needed to be notified of the results. It could be null, in that case there won't be result notifications. |
UserException | No send popup parameters. or No shutdown parameters. or Invalid operation type. |
bool Logoff | ( | string | session | ) |
Logoff an interactive session.
session | Name of the session. |
Example: Logoff an interactive session on the machine COMPUTER and with 1 as terminal session number."
<code>
UserLockServer userLockServer = new UserLockServer(".");
if (!userLockServer.Logoff("COMPUTER/1"))
Console.WriteLine("Failed to logoff the session. Error: {0}
", userLockServer.Connection.LastMessage);
TaskAsync LogoffAsync | ( | string[] | sessions | ) |
Logoffs interactive and IIS sessions in asynchronous way.
sessions | Name of the sessions. |
Example: Logoff interactive sessions on the machines COMPUTER1, COMPUTER2 and COMPUTER3; with 1 as terminal session numbers (and 2 session type, terminal). And query the asynchronous results.
bool Logoff | ( | Session | session | ) |
Logoff an interactive session.
session | Instance of the session retrieved from the server. |
Example: Logoff all interactive sessions registered on the UserLock server." <code> UserLockServer userLockServer = new UserLockServer("."); foreach (InteractiveSession userSession in userLockServer.InteractiveSessions) { Console.WriteLine("Closing session {0} of user {1}", userSession.UserName, userSession.SessionKeyName); if (userLockServer.Logoff(userSession)) Console.WriteLine(userLockServer.Connection.LastMessage); else Console.WriteLine("Session successfully closed"); }
Logoffs interactive and IIS sessions in asynchronous way.
sessions | Session instances retrieved from the server. |
Example: Logoff all interactive sessions registered on the UserLock server. And query the asynchronous results.
bool LogoffIis | ( | string | session | ) |
Logoff a IIS session.
session | KeyName of the session. |
Example: Logoff a IIS session on the machine SERVER, for APPPOOL application pool and with 1 as terminal session number."
<code>
UserLockServer userLockServer = new UserLockServer(".");
if (!userLockServer.Logoff("SERVER/APPPOOL/1"))
Console.WriteLine("Failed to logoff the session. Error: {0}
", userLockServer.Connection.LastMessage);
bool LogoffIis | ( | IisSession | session | ) |
Logoff a IIS session.
session | Instance of the session retrieved from the server. |
Example: Logoff all IIS sessions registered on the UserLock server." <code> UserLockServer userLockServer = new UserLockServer("."); foreach (IisSession userSession in userLockServer.IisSessions) { Console.WriteLine("Closing session {0} of user {1}", userSession.Name, userSession.KeyName); if (userLockServer.Logoff(userSession)) Console.WriteLine(userLockServer.Connection.LastMessage); else Console.WriteLine("Session successfully closed"); }
bool Lock | ( | string | session | ) |
Lock an interactive session by specifying the session name.
session | Name of the session. |
Example: Lock an interactive session on the machine COMPUTER and with 1 as terminal session number."
<code>
UserLockServer userLockServer = new UserLockServer(".");
if (!userLockServer.Lock("COMPUTER/1"))
Console.WriteLine("Failed to lock the session. Error: {0}
", userLockServer.Connection.LastMessage);
TaskAsync LockAsync | ( | string[] | sessions | ) |
Locks interactive sessions in asynchronous way.
sessions | Name of the sessions. |
Example: see LogoffAsync method.
bool Lock | ( | Session | session | ) |
Lock an interactive session.
session | Session instance previously retrieved from the server. |
Example: Lock all interactive sessions registered on the UserLock server." <code> UserLockServer userLockServer = new UserLockServer("."); foreach (InteractiveSession userSession in userLockServer.InteractiveSessions) if (!userSession.IsLockedOrDisconnected) { Console.WriteLine("Locking session {0} of user {1}", userSession.UserName, userSession.SessionKeyName); if (userLockServer.Lock(userSession)) Console.WriteLine(userLockServer.Connection.LastMessage); else Console.WriteLine("Session successfully locked"); }
Locks interactive sessions in asynchronous way.
sessions | Session instances previously retrieved from the server. |
Example: see LogoffAsync(List<Session>) method.
bool Reset | ( | string | session | ) |
Reset an interactive session.
session | Name of the session. |
Example: Reset an interactive session on the machine COMPUTER and with 1 as terminal session number."
<code>
UserLockServer userLockServer = new UserLockServer(".");
if (!userLockServer.Reset("COMPUTER/1"))
Console.WriteLine("Failed to reset the session. Error: {0}
", userLockServer.Connection.LastMessage);
bool ResetRas | ( | string | session | ) |
Reset a RAS session.
session | Name of the session. |
Example: Reset a RAS session on the server RASSERVER and with 1 as session number."
<code>
UserLockServer userLockServer = new UserLockServer(".");
if (!userLockServer.Reset("RASSERVER/1"))
Console.WriteLine("Failed to reset the session. Error: {0}
", userLockServer.Connection.LastMessage);
bool ResetIis | ( | string | session | ) |
Reset a IIS session.
session | Name of the session. |
Example: Reset a IIS session on the server IISSERVER and with 1 as session number."
<code>
UserLockServer userLockServer = new UserLockServer(".");
if (!userLockServer.Reset("IISSERVER/1"))
Console.WriteLine("Failed to reset the session. Error: {0}
", userLockServer.Connection.LastMessage);
bool Reset | ( | Session | session | ) |
Reset a session with a Session instance retrieved from the server.
session | Instance of the session retrieved from the server. |
Reset sessions with several Session instances retrieved from the server, in asynchronous way.
sessions | Session instances retrieved from the server. |
Example: Reset all sessions, in asynchronous way. And query the asynchronous results.
bool SendPopup | ( | string | session, |
string | message, | ||
string | title ) |
Send a popup to an interactive session.
session | Name of the session. |
message | Message to display to the user. |
title | Optional title for the popup. If empty by default "Notification". |
Example: Send a popup to the session 1 on the workstation COMPUTER.
TaskAsync SendPopupAsync | ( | string[] | sessions, |
string | message, | ||
string | title ) |
Sends a popup to several interactive sessions in asynchronous way.
sessions | Name of the sessions. |
message | Message to display to the user. |
title | Optional title for the popup. If empty by default "Notification". |
Example: see LogoffAsync method.
bool SendPopup | ( | Session | session, |
string | message, | ||
string | title ) |
Send a popup to an interactive session with a Session instance retrieved from the server.
session | Instance of the session retrieved from the server. |
message | Message to display to the user. |
title | Optional title for the popup. If empty by default "Notification". |
Sends a popup to several interactive sessions in asynchronous way.
sessions | Session instances previously retrieved from the server. |
message | Message to display to the user. |
title | Optional title for the popup. If empty by default "Notification". |
Example: see LogoffAsync(List<Session>) method.
void SendPopupToUser | ( | string | userName, |
string | message, | ||
string | title ) |
Send a popup in all sessions of a specific user.
userName | User account name |
message | Message to display to the user. |
title | Optional title for the popup. If empty by default "Notification". |
TaskAsync SendPopupAsyncToUsers | ( | string[] | userNames, |
string | message, | ||
string | title ) |
Send a popup in all sessions of several specific users in asynchronous way.
userNames | User account names. |
message | Message to display to the users. |
title | Optional title for the popup. If empty by default "Notification". |
Example: see LogoffAsync method.
void SendPopupToMachine | ( | string | machineName, |
string | message, | ||
string | title ) |
Send a popup to all sessions on a specific machine.
machineName | Computer name |
message | Message to display to users. |
title | Optional title for the popup. If empty by default "Notification". |
TaskAsync SendPopupAsyncToMachines | ( | string[] | machineNames, |
string | message, | ||
string | title ) |
Send a popup to all sessions on several specific machines in asynchronous way.
machineNames | Computer names. |
message | Message to display to users. |
title | Optional title for the popup. If empty by default "Notification". |
Example: see LogoffAsync method.
void SendPopupToGroup | ( | string | protectedGroupName, |
string | message, | ||
string | title ) |
Send a popup to all members of a protected group or OU.
protectedGroupName | Name of the group or distinguished name of the OU |
message | Message to display to users. |
title | Optional title for the popup. If empty by default "Notification". |
TaskAsync SendPopupAsyncToGroups | ( | string[] | protectedGroupNames, |
string | message, | ||
string | title ) |
Send a popup to all members of several protected groups or OUs in asynchronous way.
protectedGroupNames | Names of the groups or distinguished names of the OUs. |
message | Message to display to users. |
title | Optional title for the popup. If empty by default "Notification". |
Example: see LogoffAsync method.
bool InstallAgent | ( | string | computer | ) |
Install the agent for interactive sessions on a workstation or a terminal server.
computer | Computer name. |
Example: Install the agent the workstation COMPUTER.
bool InstallRrasAgent | ( | string | computer | ) |
Install the agent for RRAS sessions on a Microsoft RRAS server (deprecated).
computer | Server name. |
Example: Install the agent the RRAS server RRASSERVER.
bool InstallIasAgent | ( | string | computer | ) |
Install the agent for RADIUS sessions on a Microsoft NPS (IAS) server.
computer | Server name. |
Example: Install the agent the NPS server on NPSSERVER.
bool InstallIisAgent | ( | string | computer | ) |
Install the agent for IIS sessions on a Microsoft IIS server.
computer | Server name. |
Example: Install the agent the IIS server IISSERVER.
bool InstallAgent | ( | MachineState | machineState | ) |
Install an agent with a MachineState instance retrieved from the server.
machineState | MachineState instance retrieved from the server. |
TaskAsync InstallAgentAsync | ( | List< MachineState > | machineStates | ) |
Install multiple agents asynchronously, specifying MachineState instances retrieved from the UserLock server.
machineStates | MachineState instances retrieved from the UserLock server. |
Example: Install the agent in all machines that don't have it yet, asynchronously. And query the asynchronous results.
bool UninstallAgent | ( | string | computer | ) |
Uninstall the agent for interactive sessions from a workstation or a terminal server.
computer | Computer name. |
Example: Uninstall the agent from the workstation COMPUTER.
bool UninstallRrasAgent | ( | string | computer | ) |
Uninstall the agent for RRAS sessions from a Microsoft RRAS server (deprecated).
computer | Server name. |
Example: Uninstall the agent from the server RRASSERVER.
bool UninstallIasAgent | ( | string | computer | ) |
Uninstall the agent for RADIUS sessions from a Microsoft IAS/NPS server.
computer | Server name. |
Example: Uninstall the agent from the server IASSERVER.
bool UninstallIisAgent | ( | string | computer | ) |
Uninstall the agent for IIS sessions from a Microsoft IIS server.
computer | Server name. |
Example: Uninstall the agent from the server IISSERVER.
bool UninstallAgent | ( | MachineState | machineState | ) |
Uninstall the agent by using a MachineState instance retrieved from the server.
machineState | MachineState instance retrieved from the server. |
TaskAsync UninstallAgentAsync | ( | List< MachineState > | machineStates | ) |
Uninstall agents with several MachineState instances retrieved from the server, in asynchronous way.
machineStates | MachineState instances retrieved from the server. |
Example: see InstallAgentAsync method.
bool Reboot | ( | string | computer | ) |
Reboot a computer.
computer | Computer name. |
Example: Reboot the computer named COMPUTERNAME
TaskAsync RebootAsync | ( | string[] | computers | ) |
Reboots several computers in asynchronous way.
computers | Computer names. |
Example: see LogoffAsync method.
bool Reboot | ( | MachineState | machineState | ) |
Reboot a computer by specifying a MachineState instance retrieved from the UserLock server.
machineState | MachineSate instance retrieved from the server. |
TaskAsync RebootAsync | ( | List< MachineState > | machineStates | ) |
Reboot multiple computers asynchronously, specifying MachineState instances retrieved from the UserLock server.
machineStates | MachineSate instances retrieved from the UserLock server. |
Example: see InstallAgentAsync method.
bool WakeUp | ( | string | computer | ) |
Wakes up a computer.
computer | Computer name. |
Example: Wake up the computer named COMPUTERNAME
TaskAsync WakeUpAsync | ( | string[] | computers | ) |
Wakes up several computers in asynchronous way.
computers | Computer names. |
Example: see LogoffAsync method.
bool WakeUp | ( | MachineState | machineState | ) |
Wakes up a computer by specifying a MachineState instance retrieved from the UserLock server.
machineState | MachineSate instance retrieved from the server. |
TaskAsync WakeUpAsync | ( | List< MachineState > | machineStates | ) |
Wake up multiple computers asynchronously, specifying MachineState instances retrieved from the UserLock server.
machineStates | MachineSate instances retrieved from the server. |
Example: see InstallAgentAsync method.
bool Shutdown | ( | string | computer, |
ExecutionMode | executionMode, | ||
NotifyMode | notifyMode, | ||
double | timeOut, | ||
ForceMode | forceMode, | ||
string | message ) |
Shutdown a computer.
computer | Computer name. |
executionMode | Execution mode. See the enum ExecutionMode. |
notifyMode | Notify mode. See the enum NotifyMode |
timeOut | Notification timeout in minutes |
forceMode | Force applications to close. See the enum ForceMode |
message | Message to display to the user during the notification period |
Example: Shutdown the computer named COMPUTERNAME. The shutdown will occur immediately if the computer is a workstation without logged on user or after a timeout of 2 minutes otherwise. If the user as opened documents that need to be saved the shutdown will not be forced.
TaskAsync ShutdownAsync | ( | string[] | computers, |
ExecutionMode | executionMode, | ||
NotifyMode | notifyMode, | ||
double | timeOut, | ||
ForceMode | forceMode, | ||
string | message ) |
Shutdowns several computers in asynchronous way.
computers | Computer names. |
executionMode | Execution mode. See the enum ExecutionMode. |
notifyMode | Notify mode. See the enum NotifyMode |
timeOut | Notification timeout in minutes |
forceMode | Force applications to close. See the enum ForceMode |
message | Message to display to the user during the notification period |
Example: see LogoffAsync method.
bool Shutdown | ( | MachineState | machineState | ) |
Shutdown a computer by specifying a MachineState instance retrieved from the UserLock server.
machineState | MachineState instance retrieved from the UserLock server. |
TaskAsync ShutdownAsync | ( | List< MachineState > | machineStates | ) |
Overloaded function to shutdown several computers in asynchronous way, by specifying MachineState instances retrieved from the UserLock server. See the full version ShutdownAsync(List<MachineState>, ExecutionMode, NotifyMode, double, ForceMode, string) method.
machineStates | List of MachineState instances retrieved from the UserLock server. |
TaskAsync ShutdownAsync | ( | List< MachineState > | machineStates, |
ExecutionMode | executionMode, | ||
NotifyMode | notifyMode, | ||
double | timeOut, | ||
ForceMode | forceMode, | ||
string | message ) |
Shut down multiple computers asynchronously, specifying MachineState instances retrieved from the UserLock server.
machineStates | MachineState instances. |
executionMode | Execution mode. See the enum ExecutionMode. |
notifyMode | Notify mode. See the enum NotifyMode |
timeOut | Notification timeout in minutes |
forceMode | Force applications to close. See the enum ForceMode |
message | Message to display to the user during the notification period |
Example: see InstallAgentAsync method.
bool CreateTable | ( | ) |
Create or recreate the UserLogonEvents table where is stored the logon history in the UserLock database.
bool CreateTimeIndex | ( | ) |
Creates an index on the EventTime field of the UserLogonEvents table to speed up queries on time frames.
bool DeleteTimeIndex | ( | ) |
Deletes the index on the EventTime field of the UserLogonEvents table.
bool ExecuteSqlCommand | ( | string | command | ) |
Executes an SQL command on the UserLock database.
command | The SQL command. |
bool CompactDatabase | ( | ) |
Compacts the default UserLock database.
bool CleanOldLogons | ( | int | days | ) |
Removes logon events older than a specific number of days from the logon history database.
days | The event age limit in days |
bool CleanOldLogons | ( | DateTime | limitDate | ) |
Removes logon events older than a specific date from the logon history database.
limitDate | The event date limit. |
bool CleanAllLogons | ( | ) |
Clear all logon events the logon history database.
void UnblockAUser | ( | string | accountName | ) |
Unblock a specific account with the provided user name.
accountName | Account name which has to be unblocked |
void BlockAUser | ( | string | accountName, |
bool | createPermanentPA, | ||
string | message, | ||
bool | closeAllSessions ) |
Blocks a specific account with the provided user name (create the related protected account if it doesn't exist).
accountName | Account name which has to be blocked. |
createPermanentPA | If set to true , creates a new permanent protected account related to the same user (only if there is no other existing permanent). |
message | The message to display when a blocked user opens a session. |
closeAllSessions | If set to true , all the opened sessions have to be closed after blocking. If the LogoffExceedingSessions property is enabled, this parameter will be considered as true , whatever its value is. |
bool ExistingActiveTemporaryProtectedAccount | ( | string | protectedAccountName | ) |
Return True if the provided account name has already an active temporary protected account.
protectedAccountName | Protected account name |
void CloseAllSessionAfterBlocking | ( | string | protectedAccountName | ) |
Close all the opened sessions of a protected account after this user has been blocked.
protectedAccountName | Protected account name of the protected account which has been blocked |
|
static |
URL decode the parameter string according to the HTML URL Encoding Reference (https://www.w3schools.com/TAGS/ref_urlencode.asp).
sToDecode | The parameter string to URL decode in input, and the URL decoded string in output. |
|
static |
URL encode the parameter string according to the HTML URL Encoding Reference (https://www.w3schools.com/TAGS/ref_urlencode.asp).
s | The parameter string to URL encode in input, and the URL encoded string in output. |
bEncodeSlash | If set to true , all slash characters ('/') in the parameter string will be URL encoded. The default value is true. |
bEncodeComma | If set to true , all comma characters (',') in the parameter string will be URL encoded. The default value is false. |
bEncodePr100 | If set to true , all percent characters ('') in the parameter string will be URL encoded. The default value is true. |
bEncodeColon | If set to true , all colon characters (':') in the parameter string will be URL encoded. The default value is true. |
bEncodeBackS | If set to true , all backslash characters ('\') in the parameter string will be URL encoded. The default value is true. |
bEncodeAster | If set to true , all asterisk characters ('*') in the parameter string will be URL encoded. The default value is true. |
bEncodeSemiC | If set to true , all semicolon characters (';') in the parameter string will be URL encoded. The default value is true. |
bEncodeParLe | If set to true , all left parenthesis characters ('(') in the parameter string will be URL encoded. The default value is true. |
bEncodeParRi | If set to true , all left parenthesis characters (')') in the parameter string will be URL encoded. The default value is true. |
bEncodeNewLi | If set to true , all new line characters ('') in the parameter string will be URL encoded. The default value is true. |
List< ReportedUser > GetOrphanedUsers | ( | ) |
Get all orphaned users.
bool ResetMFAKey | ( | string | UserName | ) |
Resets the MFA key for the provided user account name.
UserName | User account name. |
true
if reset was successful, false
otherwise.void DisableMFA | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Disable MFA for the provided account name.
accountName | Account name. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
void DisableMFAAndResetMFAHelpMeStatus | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Disable MFA and reset the MFA help me status for the provided account name.
accountName | Account name. |
startDate | Start date of the temporary protected account. |
endDate | End date of the temporary protected account. |
TaskAsync RestartServiceAsync | ( | string | serviceName, |
string | computerName = "." ) |
Restart service on computer.
serviceName | |
computerName |
bool CanTestMfaUrl | ( | ) |
Checks if the MFA IIS URL is relative or not.
|
static |
baseUrl | |
pathToAdd |
bool TestMfaUrl | ( | out string | errorMessage, |
string | publicUrl = "", | ||
string | privateUrl = "" ) |
Tests the MFA URL.
errorMessage | [OUT] The error message if any. |
publicUrl | [IN] The public URL. |
privateUrl | [IN] The private URL. |
IList< EnabledPolicies > GetEnabledPolicies | ( | ) |
Retrive a list of all enabled policies on the server.
InitialAccessPointPolicy GetInitialAccessPointPolicy | ( | string | paIdentifier | ) |
Get the InitialAccessPointPolicy
for paIdentifier
paIdentifier | The account identifier. |
InitialAccessPointPolicy
object, or null if don't existInitialAccessPointPolicy GetTemporaryInitialAccessPointPolicy | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Get a temporary InitialAccessPointPolicy
for accountName
.
accountName | The account name |
startDate | The start date |
endDate | The end date |
bool AddInitialAccessPointPolicyToGroup | ( | string | groupName, |
out InitialAccessPointPolicy | policyRet ) |
Add a initial access point policy to a group.
groupName | The group name |
policyRet | null if failed, the created instance if succeeded |
bool AddInitialAccessPointPolicyToGroup | ( | string | groupName | ) |
Add a initial access point policy to a group.
groupName | The group name |
bool AddInitialAccessPointPolicyToUser | ( | string | userName, |
out InitialAccessPointPolicy | policyRet ) |
Add a initial access point policy to a User.
userName | The user name |
policyRet | null if failed, the created instance if succeeded |
bool AddInitialAccessPointPolicyToUser | ( | string | userName | ) |
Add a initial access point policy to a User.
userName | The user name |
bool AddInitialAccessPointPolicyToOu | ( | string | ouName, |
out InitialAccessPointPolicy | policyRet ) |
Add a initial access point policy to a OU.
ouName | the ou name |
policyRet | null if failed, the created instance if succeeded |
bool AddInitialAccessPointPolicyToOu | ( | string | ouName | ) |
Add a initial access point policy to a OU.
ouName | the ou name |
bool AddTemporaryInitialAccessPointPolicyToOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary initial access point policy to a OU.
accountName | the ou name |
startDate | start date |
endDate | end date |
bool AddTemporaryInitialAccessPointPolicyToOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out InitialAccessPointPolicy | policyRet ) |
Add a temporary initial access point policy to a OU.
accountName | the ou name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
bool AddTemporaryInitialAccessPointPolicyToGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary initial access point policy to a Group.
accountName | the group name |
startDate | start date |
endDate | end date |
bool AddTemporaryInitialAccessPointPolicyToGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out InitialAccessPointPolicy | policyRet ) |
Add a temporary initial access point policy to a Group.
accountName | the group name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
bool AddTemporaryInitialAccessPointPolicyToUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary initial access point policy to a User.
accountName | the user name |
startDate | start date |
endDate | end date |
bool AddTemporaryInitialAccessPointPolicyToUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out InitialAccessPointPolicy | policyRet ) |
Add a temporary initial access point policy to a User.
accountName | the user name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
SessionLimitPolicy GetSessionLimitPolicy | ( | string | paIdentifier | ) |
Get the SessionLimitPolicy
for paIdentifier
paIdentifier | The account identifier. |
SessionLimitPolicy
object, or null if don't existSessionLimitPolicy GetTemporarySessionLimitPolicy | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Get a temporary SessionLimitPolicy
for accountName
.
accountName | The account name |
startDate | The start date |
endDate | The end date |
bool AddSessionLimitPolicyToGroup | ( | string | groupName, |
out SessionLimitPolicy | policyRet ) |
Add a Session Limit policy to a group.
groupName | The group name |
policyRet | null if failed, the created instance if succeeded |
bool AddSessionLimitPolicyToGroup | ( | string | groupName | ) |
Add a Session Limit policy to a group.
groupName | The group name |
bool AddSessionLimitPolicyToUser | ( | string | userName, |
out SessionLimitPolicy | policyRet ) |
Add a Session Limit policy to a User.
userName | The user name |
policyRet | null if failed, the created instance if succeeded |
bool AddSessionLimitPolicyToUser | ( | string | userName | ) |
Add a Session Limit policy to a User.
userName | The user name |
bool AddSessionLimitPolicyToOu | ( | string | ouName, |
out SessionLimitPolicy | policyRet ) |
Add a Session Limit policy to a OU.
ouName | the ou name |
policyRet | null if failed, the created instance if succeeded |
bool AddSessionLimitPolicyToOu | ( | string | ouName | ) |
Add a Session Limit policy to a OU.
ouName | the ou name |
bool AddTemporarySessionLimitPolicyToOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary Session Limit policy to a OU.
accountName | the ou name |
startDate | start date |
endDate | end date |
bool AddTemporarySessionLimitPolicyToOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out SessionLimitPolicy | policyRet ) |
Add a temporary Session Limit policy to a OU.
accountName | the ou name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
bool AddTemporarySessionLimitPolicyToGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary Session Limit policy to a Group.
accountName | the group name |
startDate | start date |
endDate | end date |
bool AddTemporarySessionLimitPolicyToGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out SessionLimitPolicy | policyRet ) |
Add a temporary Session Limit policy to a Group.
accountName | the group name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
bool AddTemporarySessionLimitPolicyToUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary Session Limit policy to a User.
accountName | the user name |
startDate | start date |
endDate | end date |
bool AddTemporarySessionLimitPolicyToUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out SessionLimitPolicy | policyRet ) |
Add a temporary Session Limit policy to a User.
accountName | the user name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
WorkstationPolicy GetWorkstationPolicy | ( | string | paIdentifier | ) |
Get the WorkstationPolicy
for paIdentifier
paIdentifier | The account identifier. |
WorkstationPolicy
object, or null if don't existWorkstationPolicy GetTemporaryWorkstationPolicy | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Get a temporary WorkstationPolicy
for accountName
.
accountName | The account name |
startDate | The start date |
endDate | The end date |
bool AddWorkstationPolicyToGroup | ( | string | groupName, |
out WorkstationPolicy | policyRet ) |
Add a Workstation restrictions policy to a group.
groupName | The group name |
policyRet | null if failed, the created instance if succeeded |
bool AddWorkstationPolicyToGroup | ( | string | groupName | ) |
Add a Workstation restrictions policy to a group.
groupName | The group name |
bool AddWorkstationPolicyToUser | ( | string | userName, |
out WorkstationPolicy | policyRet ) |
Add a Workstation restrictions policy to a User.
userName | The user name |
policyRet | null if failed, the created instance if succeeded |
bool AddWorkstationPolicyToUser | ( | string | userName | ) |
Add a Workstation restrictions policy to a User.
userName | The user name |
bool AddWorkstationPolicyToOu | ( | string | ouName, |
out WorkstationPolicy | policyRet ) |
Add a Workstation restrictions policy to a OU.
ouName | the ou name |
policyRet | null if failed, the created instance if succeeded |
bool AddWorkstationPolicyToOu | ( | string | ouName | ) |
Add a Workstation restrictions policy to a OU.
ouName | the ou name |
bool AddTemporaryWorkstationPolicyToOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary Workstation restrictions policy to a OU.
accountName | the ou name |
startDate | start date |
endDate | end date |
bool AddTemporaryWorkstationPolicyToOu | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out WorkstationPolicy | policyRet ) |
Add a temporary Workstation restrictions policy to a OU.
accountName | the ou name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
bool AddTemporaryWorkstationPolicyToGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary Workstation restrictions policy to a Group.
accountName | the group name |
startDate | start date |
endDate | end date |
bool AddTemporaryWorkstationPolicyToGroup | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out WorkstationPolicy | policyRet ) |
Add a temporary Workstation restrictions policy to a Group.
accountName | the group name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
bool AddTemporaryWorkstationPolicyToUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate ) |
Add a temporary Workstation restrictions policy to a User.
accountName | the user name |
startDate | start date |
endDate | end date |
bool AddTemporaryWorkstationPolicyToUser | ( | string | accountName, |
DateTime | startDate, | ||
DateTime | endDate, | ||
out WorkstationPolicy | policyRet ) |
Add a temporary Workstation restrictions policy to a User.
accountName | the user name |
startDate | start date |
endDate | end date |
policyRet | null if failed, the created instance if succeeded |
Get the list of all protected accounts configured on the UserLock server.
Example: List all protected accounts on the UserLock server
Get the list of all customizable message from the UserLock server.
|
get |
Get all interactive sessions.
Example: Send a popup to all opened interactive sessions
|
get |
List of workstations with only the number of sessions on each workstation. User and session information is not provided. This is a public command. Anyone can get this information.
Example: Power off all workstations without any session on them
|
get |
Get the agent status for all machines of the protected network zone without the agent installed.
Example: Install the desktop agent on any workstation without the agent
Get the agent distribution properties of the UserLock server. See the class AgentDistributionProperties for more information.
Example: Start the automatic deployment mode