Install-UserLockAgent

Installs the UserLock agents in a computer through the UserLock server.

Published May 31, 2025

Synopsis

Installs the UserLock agents in a computer through the UserLock server.

Syntax

powershell
Install-UserLockAgent [-Name] <string[]> [-AgentType <AgentType[]>] [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Install-UserLockAgent [-InputObject] <MachineState[]> [-AgentType <AgentType[]>] [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Description

The Install-UserLockAgent cmdlet installs the UserLock agents in a computer through the UserLock server. You can chose the type of the agent to install, by default the cmdlet will install all possible agents depending on the roles of the computer. UserLock agents like RRAS, IAS or IIS will be installed only in server machines with the same role. Caution: PowerShell 3.0 is required.

Parameters

-Name <string[]>

Specifies the name of the computer to install the agent. You can type multiple computer names (separated by commas). Wildcard characters are permitted.

Required

false

Position

1

Accepts pipeline input

true (ByValue, ByPropertyName)

Accepts wildcard characters

true

-InputObject <MachineState[]>

Specifies the MachineState objects that represent the computers to install the agent. Enter a variable that contains the MachineState objects or a command that gets the MachineState objects, such as a Get-UserLockAgentDistribution command. You can also pipe the objects to Stop-UserLockComputer.

Required

false

Position

named

Accepts pipeline input

true (ByValue)

Accepts wildcard characters

false

-AgentType <AgentType[]>

Specifies the agent type to install. You can type multiple computer names (separated by commas). Possible values for this parameter include: Desktop or 0 RRAS or 2 IAS or 3 IIS or 4 The default agent type is Desktop, RRAS, IAS, IIS. Type is an alias of the parameter. If IAS (NPS) is concerned, after the command ends, complete the installation of the NPS Agent following the NPS Agent completing installation procedure here .

If IIS is concerned, after the command ends, complete the installation of the IIS Agent following the procedure here .

Required

false

Position

named

Accepts pipeline input

false

Accepts wildcard characters

false

Default Value

Desktop,IAS,IIS

-UserLockServerName <string>

Specifies the name of the UserLock server. The default is the localhost name.

Required

false

Position

named

Accepts pipeline input

false

Accepts wildcard characters

false

Default Value

'.'

-PassThru <SwitchParameter>

Returns the installed computer object(s). By default, this cmdlet does not generate any output.

Required

false

Position

named

Accepts pipeline input

false

Accepts wildcard characters

false

-Force <SwitchParameter>

Installs agent on computer(s) with no confirmation.

Required

false

Position

named

Accepts pipeline input

false

Accepts wildcard characters

false

-Confirm <SwitchParameter>

Prompts you for confirmation before executing the command.

Required

false

Position

named

Accepts pipeline input

false

Accepts wildcard characters

false

-WhatIf <SwitchParameter>

Describes what would happen if you executed the command without actually executing the command.

Required

false

Position

named

Accepts pipeline input

false

Accepts wildcard characters

false

<CommonParameters>

For more information about common parameters, type "Get-Help about_commonparameters".

Input Type

ISDecisions.UserLockLibrary.MachineState

Return Type

ISDecisions.UserLockLibrary.MachineState or None

Notes

You can also refer to Install-UserLockAgent by its alias, "iula". For more information, see about_Aliases. To use Install-UserLockAgent, you must have the "Agent distribution" UserLock administrative access right.

Example

powershell
Install-UserLockAgent Workstation1 -UserLockServerName MyUlSrv

Installs the Desktop UserLock agent in the computer called Workstation1 through the 'MyUlSrv' UserLock server.

Get-UserLockAgentDistribution

Start-UserLockComputer

Restart-UserLockComputer

Uninstall-UserLockAgent

Get-UserLockCommand