UserLock Documentation
UserLock Documentation
You are here: Reference > UserLock PowerShell > Cmdlet Help > Restart-UserLockComputer

Restart-UserLockComputer Cmdlet

Synopsis

Restarts a computer through the UserLock server.

Syntax

Restart-UserLockComputer [-Name] <string[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Restart-UserLockComputer [-InputObject] <MachineState[]> [-UserLockServerName <string>] [-PassThru] [-Force] [-Confirm] [-WhatIf][<CommonParameters>]

Description

The Restart-UserLockComputer cmdlet reboots a computer through the UserLock server. This cmdlet lets user know, that the computer will be restarted. Caution: PowerShell 3.0 is required.

Parameters

-Name <string[]>

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

Required true
Position 1
Accepts pipeline input true (ByValue, ByPropertyName)
Accepts wildcard characters true

-InputObject <MachineState[]>

Specifies the MachineState objects that represent the computers to reboot. 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 true
Position named
Accepts pipeline input true (ByValue)
Accepts wildcard characters false

-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 rebooted 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>

Reboots 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 Restart-UserLockComputer by its alias, "rulc". For more information, see about_Aliases. To use Restart-UserLockComputer, you must have the "Agent distribution" UserLock administrative access right.

Example

C:\PS>Restart-UserLockComputer Workstation1 -UserLockServerName MyUlSrv

Restarts the computer called Workstation1 through the 'MyUlSrv' UserLock server.

Related Links

Get-UserLockAgentDistribution

Stop-UserLockComputer

Start-UserLockComputer

Get-UserLockCommand