Skip to content

Latest commit

 

History

History
127 lines (102 loc) · 6.49 KB

Reset-LTService.md

File metadata and controls

127 lines (102 loc) · 6.49 KB

Reset-LTService

SYNOPSIS

This function will remove local settings on the agent.

SYNTAX

Reset-LTService [-ID] [-Location] [-MAC] [-Force] [-NoWait] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This function can remove some of the agents local settings. ID, MAC, LocationID The function will stop the services, make the change, then start the services. Resetting all of these will force the agent to check in as a new agent. If you have MAC filtering enabled it should check back in with the same ID. This function is useful for duplicate agents.

PARAMETERS

-ID <SwitchParameter>

This will reset the AgentID of the computer

Required                    false
Position                    named
Default value                False
Accept pipeline input       false
Accept wildcard characters  false

-Location <SwitchParameter>

This will reset the LocationID of the computer

Required                    false
Position                    named
Default value                False
Accept pipeline input       false
Accept wildcard characters  false

-MAC <SwitchParameter>

This will reset the MAC of the computer

Required                    false
Position                    named
Default value                False
Accept pipeline input       false
Accept wildcard characters  false

-Force <SwitchParameter>

This will force operation on an agent detected as a probe.

Required                    false
Position                    named
Default value                False
Accept pipeline input       false
Accept wildcard characters  false

-NoWait <SwitchParameter>

This will skip the ending health check for the reset process.

The function will exit once the values specified have been reset.

Required                    false
Position                    named
Default value                False
Accept pipeline input       false
Accept wildcard characters  false

-WhatIf <SwitchParameter>

Required                    false
Position                    named
Default value
Accept pipeline input       false
Accept wildcard characters  false

-Confirm <SwitchParameter>

Required                    false
Position                    named
Default value
Accept pipeline input       false
Accept wildcard characters  false

EXAMPLES

EXAMPLE 1

PS C:\>Reset-LTService

This resets the ID, MAC and LocationID on the agent.

EXAMPLE 2

PS C:\>Reset-LTService -ID

This resets only the ID of the agent.

NOTES

Version: 1.3

Author: Chris Taylor

Website: labtechconsulting.com

Creation Date: 3/14/2016

Purpose/Change: Initial script development

Update Date: 6/1/2017

Purpose/Change: Updates for better overall compatibility, including better support for PowerShell V2

Update Date: 3/12/2018

Purpose/Change: Added detection of "Probe" enabled agent.

Added support for -Force parameter to override probe detection. Added support for -WhatIf.

Added support for -NoWait paramter to bypass agent health check.

Update Date: 3/21/2018

Purpose/Change: Removed ErrorAction Override