< Back

Get-LinaAgent

Fri Jan 10, 2020 9:16 pm

NAME Get-LinaAgent



SYNOPSIS

Retrieves the agents on a Lina server.





SYNTAX

Get-LinaAgent [[-Name] <String>] [<CommonParameters>]



Get-LinaAgent [-ID <Int32>] [<CommonParameters>]





DESCRIPTION

Retrieves the agents on a Lina server. Returns a set of agents that correspond to the filter criteria provided





PARAMETERS

-Name <String>

Name of the agent(s) to retrieve. Wilcards are allowed. For example : *DESKTOP*



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ID <Int32>

ID of the agent to retrieve. For example : 134.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None





OUTPUTS

Array of LinaAgent Objects





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-LinaAgent -Name "TEST"



Retrieves the agent named "TEST" and display its properties.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>$agents_desktop = Get-LinaAgent -Name "*DESKTOP*"



Retrieves all the agents with DESKTOP inside their names. The list returned can be passed to other functions.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-LinaAgent | Where {$_.LastSyncTime -le ((Get-Date).AddDays(-14)) } | Select

Name,Email,LastBackup,LastSyncTime | ft



Retrieves all the agents without backups since last 14 days.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-LinaAgent -Name "TEST" | Remove-LinaAgent



Will get the agent named TEST then pass it to the next command for deletion.











RELATED LINKS