Mail Servers

Get-LiquitMailServer

Synopsis

This command displays a list of all mail servers defined within the Liquit zone.

Syntax

 Get-LiquitMailServer 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitMailServer 
	[-ID] <guid[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]

 Get-LiquitMailServer 
	[-EntityRef] <EntityRef[]> 
	[-LiquitContext <LiquitContext>]  
	[<CommonParameters>]
    
Get-LiquitMailServer 
    [-Search] <string> 
    [-LiquitContext <LiquitContext>]
    [<CommonParameters>]

Get-LiquitMailServer 
    [-Name] <string> 
    [-LiquitContext <LiquitContext>]  
    [<CommonParameters>]

Examples

Example 1: Get-LiquitMailServer

 Get-LiquitMailServer 

This command displays all mail servers defined in the Liquit Workspace.

Example 2: Get-LiquitMailServer

 Get-LiquitMailServer -id 00000000-0000-0000-0000-000000000000

This command selects a specific mail server.

Parameters

Name Value Description Required Default value
Search <string> This parameter serves a similar purpose to the search box found in the mail settings table from the Liquit Workspace UI. It enables users to search multiple columns within the table, such as Name and Server. When a search term is provided, the parameter filters records by matching values in these indexed columns. However, it's important to note that not all columns in the table are indexed, meaning that searches for values in these non-indexed columns will not return results. Non-indexed columns include for example the ID and columns containing checkboxes.
Name <string> Searches on the mail server name itself.
LiquitContext <LiquitContext> Determines the selected zone. No Default

New-LiquitMailServer

Synopsis

This command creates a new mail server.

Syntax

 New-LiquitMailServer 
	[-Name] <string> 
	-From <string> 
	-Server <string>
	[-Secure <bool>] 
	[-Port <int>] 
	[-Priority <int>] 
	[-Credential <pscredential>] 
	[-Description <string>] 
	[-Enabled <bool>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf]
	[-Confirm]  
	[<CommonParameters>]

Example

     New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"

This command creates a new mail server named "PowerShell Mail Server".

Parameters

Name Value Description Required Default value
Name <string> Provide a name for the mail server. Yes
From <string> The sender address. Yes
Server <string> The server address. Yes
Secure <bool> Whether or not the connection is secure. No False
Port <int> The port that should be used. No 25
Priority <int> The priority the mail server takes. No 10
Credential <pscredential> The credential used to authenticate to the mail server. No
Description <string> The description of the mail server. No
LiquitContext <LiquitContext> Determines the selected zone. No Default

Set-LiquitMailServer

Synopsis

This command lets you edit the properties of a mail server.

Syntax

 Set-LiquitMailServer 
	[-MailServer] <MailServer[]> 
	[-Name <string>] 
	[-From <string>] 
	[-Secure <bool>] 
	[-Server <string>] 
	[-Port <int>] 
	[-Priority <int>] 
	[-Credential <pscredential>] 
	[-Description <string>]
	[-Enabled <bool>] 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

  $mailServer = New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"
 Set-LiquitMailServer -Name "Updated PowerShell Mail Server" 

This command updates an existing mail server and renames it "Updated PowerShell Mail Server".

Parameters

Name Value Description Required Default value
Name <string> Provide a name for the mail server. No
From <string> The sender address. No
Server <string> The server address. No
Secure <bool> Whether or not the connection is secure. No False
Port <int> The port that should be used. No 25
Priority <int> The priority the mail server takes. No 10
Credential <pscredential> The credential used to authenticate to the mail server. No
Description <string> The description of the mail server. No
LiquitContext <LiquitContext> Determines the selected zone. No Default

Remove-LiquitMailServer

Synopsis

This command removes a mail server from the Liquit Workspace.

Syntax

 Remove-LiquitMailServer
	[-MailServer] <MailServer[]> 
	[-LiquitContext <LiquitContext>] 
	[-WhatIf] 
	[-Confirm]  
	[<CommonParameters>]

Example

  $mailServer = New-LiquitMailServer -Name "PowerShell Mail Server" -From "post@liquit.com" -Server "mail.liquit.com"
 Remove-LiquitMailServer -MailServer $mailServer 

This command removes the selected mail server from the Liquit Workspace.

Parameters

Name Value Description Required Default value
MailServer <MailServer[]> The mail server you wish to remove. Yes
LiquitContext <LiquitContext> Determines the selected zone. No Default