Lina administration using Powershell
Articles / Posts
- Tina 4.8 GA is available
- Lina 6.1 GA is available
- PowerShell for Lina 6.0
- Advisory ID : LINA/ADE-2023-0002
- Advisory ID : LINA/ADE-2023-0001
- Time Navigator 4.6.9 Hyper-V Software Alert
- Tina 4.7.1 GA is available !
- Miria install error on a Linux server without X11
- HSS Replication requires attention when upgrading to 5.x
- LINA Agents 5.3.4
Categories
- Lina – EN (21)
- Miria – EN (8)
- Tina – EN (18)
Archives
- July 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- October 2022
- September 2022
- July 2022
- December 2021
- November 2021
- October 2021
- July 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
A PowerShell Module is available to manage Lina configurations (agents, strategies, protections, tenants etc).
This module is published onlineand can be installed using a single command on recent PowerShell versions (5.0+).
The module itself is compatible with PowerShell for Windows versions 3.0+ and PowerShell Core 6.0+. Please note that PowerShell Core can be installed on Windows, MacOS or Linux so this module can be used on most OS.
How to check my version of PowerShell ?
PowerShell is installed by default on most WIndows OS :
PowerShellVersion Default Windows Versions
To check the version installed, open a PowerShell Terminal then type$PSVersionTable
Module Release Notes
Release notes can be found on PowerShell Gallery (where the module is published online) : https://www.powershellgallery.com/packages/Atempo.Linathen unfold “Package Details” to see the release notes.
Module Installation
To install the module :
Module update
Module update are not automatic. Module should only be updated if you have an issue or if you update the Lina Version.
Module versioning matches major versions of Lina. For example : Module version 5.1.0.2 is knwon to work with Lina 5.1.
This script will automatically update the module to latest version :
Uninstall-Module -Name Atempo.Lina -AllVersions -ErrorAction SilentlyContinue
Install-Module -Name Atempo.Lina -Force
If you don’t have internet access, use the same method as for the installation but update the module on your workstation thenremove the old Atempo.Lina folder then replace it with the new one.
How to use the module ?
First time use : Manually run the Get-LinaHelpcommand. This will ensure that the module is correctly installed and loaded and should open the Module Help (HTML format). Note : If this command is not recognized try to run Import-Module Atempo.Lina thenGet-LinaHelp. You can also use the built-in help usingGet-Help command.For example :Get-Help Connect-LinaServer All commands provided by thie module follow the standard PowerShell naming (Verb-Noun).
OBJECT can be :
Agent
AgentGroup
Tenant
Strategy
Protection
CurrentTenant
GlobalStats (get only)
more to come
Commands can be pipelined. For example if you want to remove all agents with “TEST” in their names :
Get-LinaAgent -Name “*TEST*” | Remove-LinaAgent
Example
This is a basic example :
# Connect to a lina server, use french language for default elements
Connect-LinaServer -Server “https://10.10.10.10:8181” -User “superadmin” -Password “superadmin” -Locale “fr”
# Get list of objects
Get-LinaGlobalStats
Get-LinaAgent
Get-LinaAgentStats
Get-LinaCurrentTenant
Get-LinaStrategy Get-LinaTenant
# Create a new Agent
New-LinaAgent -Name “TEST-QA-API”
# Rename an agent
Set-LinaAgent -Name “TEST-QA-API” -NewName “TEST-QA-API-RENAMED”
# Delete an agent
Get-LinaAgent -Name “TEST-QA-API-RENAMED” | Remove-LinaAgent
# Disconnect from server
Disconnect-LinaServer