You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function retrieves the current agent proxy settings for module functions to use the specified proxy configuration for all communication operations as long as the module remains loaded.
SYNTAX
Get-LTProxy [<CommonParameters>]
DESCRIPTION
This function will get the current LabTech Proxy settings from the installed agent (if present). If no agent settings are found, the function will attempt to discover the current proxy settings for the system. The Proxy Settings determined will be stored in memory for internal use, and returned as the function result.
NOTES
Version: 1.1
Author: Darren White
Creation Date: 1/24/2018
Purpose/Change: Initial function development
Update Date: 3/18/2018
Purpose/Change: Ensure ProxyUser and ProxyPassword are set correctly when proxy
Required true
Position 1
Default value
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-ServerPassword <String>
Required false
Position 2
Default value
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-LocationID <Int32>
This is the LocationID of the location that the agent will be put into.
(Get-LTServiceInfo).LocationID
Required false
Position 3
Default value 0
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-TrayPort <Int32>
This is the port LTSvc.exe listens on for communication with LTTray processess.
Required false
Position 4
Default value 0
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-Rename <String>
This will call Rename-LTAddRemove after the install.
Required false
Position 5
Default value
Accept pipeline input false
Accept wildcard characters false
-Hide <SwitchParameter>
This will call Hide-LTAddRemove after the install.
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false
-SkipDotNet <SwitchParameter>
This will disable the error checking for the .NET 3.5 and .NET 2.0 frameworks during the install process.
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false
-Force <SwitchParameter>
This will disable some of the error checking on the install process.
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 install process.
The function will exit once the installer has completed.
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:\>Install-LTService-Server https://lt.domain.com-Password sQWZzEDYKFFnTT0yP56vgA==-LocationID 42
This will install the LabTech agent using the provided Server URL, Password, and LocationID.
NOTES
Version: 1.8
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: 6/10/2017
Purpose/Change: Updates for pipeline input, support for multiple servers
Update Date: 6/24/2017
Purpose/Change: Update to detect Server Version and use updated URL format for LabTech 11 Patch 13.
Update Date: 8/24/2017
Purpose/Change: Update to use Clear-Variable. Additional Debugging.
Update Date: 8/29/2017
Purpose/Change: Additional Debugging.
Update Date: 9/7/2017
Purpose/Change: Support for ShouldProcess to enable -Confirm and -WhatIf.
Update Date: 1/26/2018
Purpose/Change: Added support for Proxy Server for Download and Installation steps.
Update Date: 2/13/2018
Purpose/Change: Added -TrayPort parameter.
Update Date: 3/13/2018
Purpose/Change: Added -NoWait parameter.
Added minimum size requirement for agent installer to detect and skip a bad file download.
Update Date: 6/5/2018
Purpose/Change: Added -SkipDotNet parameter.
Allows for skipping of .NET 3.5 and 2.0 framework checks for installing on OS with .NET 4.0+ already installed
This function will backup all the reg keys to 'HKLM\SOFTWARE\LabTechBackup' This will also backup those files to "$((Get-LTServiceInfo).BasePath)Backup"
SYNTAX
New-LTServiceBackup [<CommonParameters>]
NOTES
Version: 1.4
Author: Chris Taylor
Website: labtechconsulting.com
Creation Date: 5/11/2017
Purpose/Change: Initial script development
Update Date: 6/1/2017
Purpose/Change: Updates for better overall compatibility, including better support for PowerShell V2
This script will attempt to pull all current settings from machine and issue an 'Uninstall-LTService', 'Install-LTService' with gathered information. If the function is unable to find the settings it will ask for needed parameters.
This is used to download the installation and removal utilities.
If no server is provided the uninstaller will use Get-LTServiceInfo to get the server address.
If it is unable to find LT currently installed it will try Get-LTServiceInfoBackup
Required false
Position 1
Default value
Accept pipeline input true (ByValue, ByPropertyName)
Accept wildcard characters false
-ServerPassword <String>
Required false
Position 2
Default value
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-LocationID <String>
The LocationID of the location that you want the agent in
example: 555
Required false
Position 3
Default value
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-Backup <SwitchParameter>
This will run a New-LTServiceBackup command before uninstalling.
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false
-Hide <SwitchParameter>
Will remove from add-remove programs
Required false
Position named
Default value False
Accept pipeline input false
Accept wildcard characters false
-Rename <String>
This will call Rename-LTAddRemove to rename the install in Add/Remove Programs
Required false
Position 4
Default value
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
-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:\>Redo-LTService
This will ReInstall the LabTech agent using the server address in the registry.
EXAMPLE 2
PS C:\>Redo-LTService-Server https://lt.domain.com-Password sQWZzEDYKFFnTT0yP56vgA==-LocationID 42
This will ReInstall the LabTech agent using the provided server URL to download the installation files.
NOTES
Version: 1.5
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: 6/8/2017
Purpose/Change: Update to support user provided settings for -Server, -Password, -LocationID.
Update Date: 6/10/2017
Purpose/Change: Updates for pipeline input, support for multiple servers
Update Date: 8/24/2017
Purpose/Change: Update to use Clear-Variable.
Update Date: 3/12/2018
Purpose/Change: Added detection of "Probe" enabled agent.
Added support for -Force parameter to override probe detection.
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.
This function will set or clear Proxy settings needed for function and agent operations. If an agent is already installed, this function will set the ProxyUsername, ProxyPassword, and ProxyServerURL values for the Agent. NOTE: Agent Services will be restarted for changes (if found) to be applied.
PARAMETERS
-ProxyServerURL <String>
This is the URL and Port to assign as the ProxyServerURL for Module
operations during this session and for the Installed Agent (if present).
This function will rename the HiddenDisplayName registry key to show it in the add/remove programs list. If there is not HiddenDisplayName key the function will import a new entry.
PARAMETERS
-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
NOTES
Version: 1.2
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: Support for ShouldProcess. Added Registry Paths to be checked.
Modified hiding method to be compatible with standard software controls.
This function will verify that the LabTech services are present. It will then check for any process that is using the LTTray port (Default 42000) and kill it. Next it will start the services.
PARAMETERS
-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
NOTES
Version: 1.5
Author: Chris Taylor
Website: labtechconsulting.com
Creation Date: 3/14/2016
Purpose/Change: Initial script development
Update Date: 5/11/2017
Purpose/Change: added check for non standard port number and set services to auto start
Update Date: 6/1/2017
Purpose/Change: Updates for better overall compatibility, including better support for PowerShell V2
Update Date: 12/14/2017
Purpose/Change: Will increment the tray port if a conflict is detected.
Update Date: 2/1/2018
Purpose/Change: Added support for -WhatIf. Added Service Control Command to request agent check-in immediately after startup.
This function will verify that the LabTech services are present then attempt to stop them. It will then check for any remaining LabTech processes and kill them.
PARAMETERS
-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
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: Updated Support for ShouldProcess to enable -Confirm and -WhatIf parameters.
This function will stop all the LabTech services. It will then download the current agent install MSI and issue an uninstall command. It will then download and run Agent_Uninstall.exe from the LabTech server. It will then scrub any remaining file/registry/service data.
If no server is provided the uninstaller will use Get-LTServiceInfo to get the server address.
Required false
Position 1
Default value
Accept pipeline input true (ByPropertyName)
Accept wildcard characters false
-Backup <SwitchParameter>
This will run a 'New-LTServiceBackup' before uninstalling.
Required false
Position named
Default value False
Accept pipeline input true (ByPropertyName)
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
-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:\>Uninstall-LTService
This will uninstall the LabTech agent using the server address in the registry.
EXAMPLE 2
PS C:\>Uninstall-LTService-Server 'https://lt.domain.com'
This will uninstall the LabTech agent using the provided server URL to download the uninstallers.
NOTES
Version: 1.5
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: 6/10/2017
Purpose/Change: Updates for pipeline input, support for multiple servers
Update Date: 6/24/2017
Purpose/Change: Update to detect Server Version and use updated URL format for LabTech 11 Patch 13.
Update Date: 8/24/2017
Purpose/Change: Update to use Clear-Variable. Modifications to Folder and Registry Delete steps. Additional Debugging.
Update Date: 1/26/2017
Purpose/Change: Added support for Proxy Server for Download and Installation steps.
Update Date: 3/12/2018
Purpose/Change: Added detection of "Probe" enabled agent.
Added support for -Force parameter to override probe detection.
Updated support of -WhatIf parameter.
Added minimum size requirement for agent installer to detect and skip a bad file download.
This script will attempt to pull current server settings from machine, then download and run the agent updater.
PARAMETERS
-Version <String>
This is the agent version to install.
Example: 120.240
This is needed to download the update file. If omitted, the version advertised by the server will be used.
Required false
Position 1
Default value
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:\>Update-LTService-Version 120.240
This will update the Automate agent to the specific version requested, using the server address in the registry.
EXAMPLE 2
PS C:\>Update-LTService
This will update the Automate agent to the current version advertised, using the server address in the registry.
0 commit comments