Lina administration using powershell
Articles / Posts
- Lina 6.1 “Controlled Release” est disponible sur demande
- PowerShell pour 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 est disponible
- L’installation de Miria tombe en erreur sur un serveur Linux sans X11
- La réplication HSS nécessite une attention particulière lors de la mise à niveau vers 5.x
- Agents LINA 5.3.4
- Miria 3.15 GA est disponible !
Archives
- avril 2023
- mars 2023
- février 2023
- janvier 2023
- décembre 2022
- octobre 2022
- septembre 2022
- juillet 2022
- décembre 2021
- novembre 2021
- octobre 2021
- septembre 2021
- juillet 2021
- mai 2021
- avril 2021
- mars 2021
- février 2021
- janvier 2021
- novembre 2020
- octobre 2020
- septembre 2020
- août 2020
- juillet 2020
- juin 2020
- mai 2020
- mars 2020
- février 2020
- janvier 2020
- décembre 2019
A PowerShell Module is available to manage Lina configurations (agents, strategies, protections, tenants etc).
This module is published online and 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